How to Open Facebook API to open Login Dialog? - iphone

I m using facebook api from https://developers.facebook.com/docs/mobile/ios/
and using [facebook authorize:nil]; to open login dialog. But when I run on simulator it opens facebook dialog for login but when I run it in iphone It opens my facebook Application to login instead of facebook Dialog. I want to show facebook dialog when user is not login otherwise run code that I have applied.

If you logged in the Facebook account once from the simulator it goes to the desired feature next time onwards. Please check it.Thanks.

Facebook has an Single Sign On technique for permission grant. The tutorial that you are following does the same for you. It will open the Facebook App for you or the Safari, if it is not found. So the authentication process may remain clear under the oAuth protocol.

Related

Facebook Login - Log for user login attempts?

Does Facebook Login log all user login attempts on my app (failed, accepted...) ?
Where can I see this log?
By Facebook Login I mean the API provided by FB to allow users to "login with" in my App/Website.
I use Laravel Socialite.
ThereĀ“s the App Insights - just check out the App in the developer dashboard: https://developers.facebook.com/apps. Apart from that, you would have to log stuff on your own.

Facebook Recent Logins breaks OAuth flow

I'm having troubles working with what appears to be an error with Facebook's OAuth server-side flow. When logging into Facebook using "Recent Logins", Facebook does not redirect back to my calling application. Instead it goes directly to the Facebook home page.
If I login to Facebook using the email/password fields at the top right of the screen, then the redirection becomes successful.
Is there some way to force facebook to send users to it's main login page and not this main page that displays the recent logins when they are not already logged into Facebook?
This also occurs using Facebook's very own OAuth for developers. So I know it can't be just me.
Login to Facebook.com
Logout
Visit facebook's apps page
Click your profile pic and enter your password (rather than using the blue banner to login).
Facebook redirects you to their home page rather than this page
What would be great is a parameter to this page that would allow me to force a particular facebook login dialog as a workaround.

Remove Facebook auth to my website for my Facebook account

I want to test the log-in flow for my website that uses Facebook auth.
Unfortunately, after the first time I log into my site with Facebook, I am never shown Facebook's auth window or flow again. I' just automatically logged in.
How can I remove my permission to a particular website so I am presented with Facebook's login flow again?
just remove your app from https://www.facebook.com/settings?tab=applications
afterwards it will ask for all permissions again.

How to get Facebook access token and User ID on iphone

I want to make a demo of using OAuth to get a facebook access token in a mobile app.
i have a button on the main view. After button is clicked, I use safari to open the facebook OAuth dialog. After logging in to facebook, I can't figure out how to get the access token and UserID.
You need to spend some time reading the documentation on how Facebook works with iOS. Specifically there is a whole documentation section dedication to iOS authentication.
The way you are currently doing it with redirecting to Safari is not the preferred way of handling this as far as I know.

Facebook OAuth - is there a way to 'clear' previous user?

I'm writing a Windows Phone App and am using the OAuth interface.
When I navigate to the auth url the first time it shows the login UI. Subsequent times I'm redirected directly to my facebook app page with showing the login UI. Presumably because the login is cached in a cookie or something. All good so far.
The problem comes in when I need to switch users. Is there a way to force the facebook oauth url to clear previous creds and show the login screen?
Thanks!
Log the user out of Facebook using the url below:
https://www.facebook.com/logout.php?access_token=ACCESS_TOKEN&confirm=1&next=REDIRECT
Now, in order to log a user out of Facebook you need to use this url:
"https://www.facebook.com/logout.php?next="+your_site_url_registered _on_fb+"&access_token="+accessToken