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?


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

Specifically how to login with iOS:

And Android:

This is done through the Facebook iOS SDK, available on GitHub here:

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 :