小编Ale*_*lex的帖子

应用程序授权后,IOS-Facebook空白屏幕

我正在从Parse v1.6.4升级到最新版本,我也正在将facebook ios sdk升级到v4.7.问题是在应用程序被授权后,它显示一个空白的白色屏幕,如果我点击"完成",它会关闭Safari并在日志中显示用户取消登录.
在将其升级到新版本之前,它工作正常.

我的plist

<key>CFBundleURLTypes</key>
 <array>
  <dict>
   <key>CFBundleURLSchemes</key>
 <array>
 <string>fbxxxxxx</string>
 </array>
 </dict>
</array>
<key>FacebookAppID</key>
<string><my FacebookAppID></string>
<key>FacebookDisplayName</key>
<string>my appname</string>
Run Code Online (Sandbox Code Playgroud)

白名单FB服务器

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>facebook.com</key>
<dict>
  <key>NSIncludesSubdomains</key>
  <true/>
  <key>NSExceptionRequiresForwardSecrecy</key>
  <false/>
</dict>
<key>fbcdn.net</key>
<dict>
  <key>NSIncludesSubdomains</key>
  <true/>
  <key>NSExceptionRequiresForwardSecrecy</key>
  <false/>
</dict>
<key>akamaihd.net</key>
<dict>
  <key>NSIncludesSubdomains</key>
  <true/>
  <key>NSExceptionRequiresForwardSecrecy</key>
  <false/>
</dict>
Run Code Online (Sandbox Code Playgroud)

<key>LSApplicationQueriesSchemes</key>
 <array>
  <string>fbapi</string>
  <string>fb-messenger-api</string>
  <string>fbauth2</string>
  <string>fbshareextension</string>
</array>
Run Code Online (Sandbox Code Playgroud)

AppDelegate.m

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
  return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                         openURL:url
                                               sourceApplication:sourceApplication
                                                      annotation:annotation];
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
  [FBSDKAppEvents activateApp];
}

- …
Run Code Online (Sandbox Code Playgroud)

facebook ios facebook-ios-sdk parse-platform

6
推荐指数
1
解决办法
2363
查看次数

标签 统计

facebook ×1

facebook-ios-sdk ×1

ios ×1

parse-platform ×1