Pix*_*xel 7 sdk facebook ios facebook-ios-sdk swift
我正在使用Facebook-iOS-SDK-4进行FB登录,但是当我尝试编译时出现此错误.
2015-06-05 03:15:02.001 Hooiz [4681:781254]***由于未捕获的异常'InvalidOperationException'终止应用程序,原因:'fb620223481391648未注册为URL方案.请将其添加到您的Info.plist中
我.plist就像Facebook文档:

info.plist使用文本编辑器打开文件,您应该像这样找到它
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb288500927xxxxx</string>
</array>
</dict>
</array>
<key>Item 0</key>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb288500927xxxxxx</string>
</array>
</dict>
<key>CFBundleVersion</key>
<string>1</string>
<key>FacebookAppID</key>
<string>288500927xxxxxx</string>
<key>FacebookDisplayName</key>
<string>?????</string>
Run Code Online (Sandbox Code Playgroud)
将其更改为此格式(注意两种格式之间的差异)清理构建并重新启动XCode.你完成了:)
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string></string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb288500927xxxxxx</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1</string>
<key>FacebookAppID</key>
<string>288500927xxxxxx</string>
<key>FacebookDisplayName</key>
<string>?????</string>
Run Code Online (Sandbox Code Playgroud)
Siv*_*ina -1
再次检查您的脸书应用程序 ID。在 info.plist 中添加您注册的 Facebook 应用程序 ID。并且还将 URL 方案标识符 fbXXXXXXXXXXXX(XXXXXXXXX 是之前添加的 facebook 应用程序 ID)添加到 info.plist 并检查
希望这可以帮助!!
| 归档时间: |
|
| 查看次数: |
5339 次 |
| 最近记录: |