How to get your own Facebook login on iOS using SDK 3.1?

I downloaded the new Facebook iOS SDK 3.1 , which promises has a built-in login prompt . I launched the registration application on my iOS 6 device. When I tried to connect to Facebook, I did not get my own login. Instead, the Facebook application launches in the same way as the old SDK. Their Facebook login button basically does this:

[appDelegate.session openWithCompletionHandler:^(FBSession *session, FBSessionState status, NSError *error) { [self updateView]; } ]; 

I thought the sample code did not call the correct function. So I tried FBSession another login function.

 [appDelegate.session openWithBehavior:FBSessionLoginBehaviorWithNoFallbackToWebView completionHandler:^(FBSession *session, FBSessionState status, NSError *error) { [self updateView]; } ]; 

I tried all possible behaviors, and none of them pulled out an invitation for my own entry.

+4
source share
3 answers

First you logged in to Facebook from your iOS settings?

Once you do, their sample Scrumptious project will use the built-in prompt for login when trying to connect.

+4
source

Read this: https://developers.facebook.com/docs/howtos/ios-6/#nativeauthdialog

Basically, you should first request basic permissions and access rights, and then request publication rights separately.

+1
source

This is by design and is described in the second section https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/upgrading-from-3.0/

Basically, you cannot request read and post permissions in the iOS6 dialog box. Therefore, you are more or less obliged to request them in a shaky way (for example, read when you first log in, and then publish when your application really needs to be published).

If you insist on using an outdated method to try to get and publish it at the same time, the SDK has no choice but to return to web technology or using applications.

+1
source

Source: https://habr.com/ru/post/1436451/


All Articles