仅在iOS 9中FBSDKGraphRequest FBSDKGraphRequestConnection返回错误

时间:2015-09-26 12:30:12

标签: facebook-graph-api ios9 parsefacebookutils

这是iOS 9.0.1的登录成功。

enter image description here

这是iOS 9 iPhone的登录失败。

enter image description here

在iOS 9 iPhone中我有这个警告:

enter image description here

sdk更新从此处解析1.8.5和Facebook到4.6:https://developers.facebook.com/docs/ios/ios9

我该怎么做才能解决这个问题?

Facebook登录是使用PFFacebookUtils logInInBackgroundWithReadPermissions:

  NSArray *permissions = [NSArray arrayWithObjects:@"email",@"user_friends", nil];
[PFFacebookUtils logInInBackgroundWithReadPermissions:permissions block:^(PFUser *user, NSError *error)
 {
     if (!user) // The user cancelled the Facebook login
     {
         NSLog(@"Uh oh. The user cancelled the Facebook login.");
     }
     else if (user.isNew) 
     {

     }
     else if (user) // the user is exist at DB
     {

     }
     else if (error)
     {
     }
 }];

1 个答案:

答案 0 :(得分:0)

你有没有在你的plist中添加这个参数?

<key>FacebookAppID</key>
<string>YourFBKey</string>
<key>FacebookDisplayName</key>
<string>moodoo</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbauth</string>
    <string>fbauth2</string>
    <string>fb-messenger-api20140430</string>
    <string>fb-messenger-platform-20150128</string>
    <string>fb-messenger-platform-20150218</string>
    <string>fb-messenger-platform-20150305</string>