how to oauth login facebook through native Facebook?

Usually we use the pop-up webview connect facebok on iphone apps. However, I have seen some applications, auth link to facebook by facebook native app,If the iphone is already installed on the official app. how to do this?

Answers


Your app would include the iOS or Android SDK for Facebook.

https://developers.facebook.com/docs/sdks/

Specifically how to login with iOS: https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/

And Android: https://developers.facebook.com/docs/reference/androidsdk/authentication/


This is done through the Facebook iOS SDK, available on GitHub here: https://github.com/facebook/facebook-ios-sdk

This is seamless, and Facebook handles the case if the app is installed on the device. This is done with the "fb://" URL scheme. You can learn more here

To authenticate on Facebook with the SDK, you do this:

Facebook *facebook = [[Facebook alloc] init];
NSArray *fb_perms =  [NSArray arrayWithObjects:@"email", @"user_photos", @"offline_access",nil];
[facebook authorize:fb_perms delegate:self];

Don't forget to release!


Need Your Help

Script to extract characters from a file

regex sed awk grep

I have a text file which looks like this :