How to logout of Facebook and Gmail with api during native app automation? - facebook

I'm automating native iOS app with Appium. Which has scenarios related to connect with facebook or gmail.
As base state, I want to make sure user has logged out of facebook and gmail.
Please let me know if this is possible with api calls?
Thanks & Regards,
Vikram

Same issue here.
Workaround: As a precondition, open the safari browser on device and logout. Use SafariLaucher https://github.com/budhash/SafariLauncher, create webapp steps to logout in BeforeClass/Method.

Related

Facebook native mobile application and mobile browser sharing session

I have a website which allows login via facebook functionality and displays photos from facebook.
While accessing from a mobile browser I would like the website to automatically login(when the click on FB login button, without entering username and password) if the user is already logged in via the native FB application (iOS or andriod). It seems to be that I can do that by building a native iOS or android application and use facebook single sign on feature. Is it possible to do that without having the user install anything on their mobile device?
That is not possible.
Auto-Login relies on auth tokens that will be granted to a website or mobile app after a user approves an app. For security reasons, those tokens are tight to the cause they were issued for. Particularly, web tokens and mobile tokens are not interchangeable.
So you could build a native mobile app to get a "native token", but even if you would manage to (cookie-)inject it into a browser view, your website's backend couldn't use it.
More generally, you're raising an issue even facebook can't solve: Say you are using a facebook mobile app and logged in there. If you open facebook's web version on that very same phone, you'll have to log in there again. The root cause is the same as with above. Specifically, any native app is uncapable of setting arbitrary auth cookies into the OS browser. I personally believe this restriction will not fall, because it would have a large security impact - just imagine how any app could set (and possibly get) cookies for any website.
If they've never logged in facebook from their Mobile, how will your website ever know them ?
Is it possible to do that without having the user install anything on their mobile device?
Like PC's, users in a mobile device need to login in their phone in facebook's website before being eligible to login "automatically" to your website. When I say automatically, I mean they still have to go with the first time process of "Do you authorize this app/website to do X things on your account". That message is inevitable when using facebook's api on the web.
Hope this answers your question.
Is it possible to do that without having the user install anything on
their mobile device?
No this would not be possible. You need to have a native or hybrid app (phonegapped etc) to make it work. Mobile web apps run in a browser sandbox and without native code interface - you cannot get to the native SSO of FB on your mobile device
Did you have a look at this facebook page ? I'm not sure what you ask is possible, as basav said, but maybe you'll have some clues there.

iOS 5 Facebook Integration

I am writing an app and for the first time I want to integrate some Facebook SDK functionality. I want to have the user login to their Facebook account, then be able to choose one of their friends to "compete" against in the app.
I am following the instructions on the Facebook developers site for iOS but what I can't seem to figure out is how to present a "login with Facebook" view when the app is launched and then never again while the Facebook SSO is authorized or unless the user logs out of the app.
The example I'll use for this is like the DrawSomething app's workflow for authentication.
Any ideas of how to accomplish this? Tutorials or examples would be awesome! I am using iOS 5 with storyboards for the app if that makes a difference.
Thanks!
-Brian
First authenticate :
Facebook API/SDK integration

Facebook login on windows 7

I'm trying to build a phone app on the windows phone, I've decided to use Facebook as a mean of authentication, for users to login. I've been reading through the Facebook Mobile Dev page, but I couldn't see any SDK for a window phone native app.
Am I missing something? Is there another technique to login the user through Facebook?
I think you need to use OAuth in the web browser to get this to work. I used the Facebook c# sdk by following instructions on Prabir's Blog.
George

Open IOS Application which uses sharekit via fbconnect and/or sharekit from facebook app or facebook website

Does anyone of you know if it is possible to open a App which uses sharekit from a Facebook request by clicking on the request either in the facebook app, or in the browser?
I could not find anything about this in the web.
To be more precise i want my app which uses sharekit to send a request to a facebook-friend. This facebook friend should then be able to open the same app by clicking on the request either in the facebook app on his mobile device or by clicking on the request on the facebook browser page which is opened on his mobile device.
I already know how to share things in facebook via sharekit, but to get it "the other way round" seems to be difficult. I could not find anything helpful in the web so far.
Greets and many thanks in advance,
Maverick1st
Yes. Your will will need to register itself as a protocol handler, and the link clicked on from Facebook app would need to use the url scheme you define.
Example:
my-social-app://invite/1234
Keep in mind if the recipient does not have the app installed, or they do this on their desktop machine, they will get a message that the phone is unable to open that URL.
See this tutorial: http://mobileorchard.com/apple-approved-iphone-inter-process-communication/

iPhone/ Facebook authentication without using login dialog

Is it possible to authenticate facebook and retrive the access token by entering the user-id and password on custom login screen ?
Application will not authorise through Safari or facebook application sdk for ios.
Application requred to enter the username and password inside the application through custom login.
Hope someone help us.
Thanks
If you implement all the OAuth stuff yourself, then yes, it is possible. But why do you need to do something like that? Anyways, you can start inspecting the Facebook iOS SDK code if you really have to do it this way. - https://github.com/facebook/facebook-ios-sdk