我正在使用Facebook SDK-4作为FB登录,但是当我试图编译时,我出现了这个错误。
2015-06-05 03:15:02.001 Hooiz4681:781254 *终止应用程序由于非正常异常“InvalidOperationException”,原因:“fb620223481391648未注册为Info.plist方案,请将其添加到您的Info.plist中”
我的.plist就像Facebook文档:

发布于 2015-06-11 09:10:08
使用文本编辑器打开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>将其更改为这种格式(注意这两种格式之间的区别),清理构建并重新启动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>发布于 2015-06-29 10:40:10
首先,验证您是否正确地执行快速入门指令。
验证是否将此代码添加到应用程序委托中:
#import <FBSDKCoreKit/FBSDKCoreKit.h>
- (void)applicationDidBecomeActive:(UIApplication *)application {
[FBSDKAppEvents activateApp];
}
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
return [[FBSDKApplicationDelegate sharedInstance] application:application
didFinishLaunchingWithOptions:launchOptions];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
return [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation];
}之后,在info - URL类型下面还有另一节(这是我花了几个小时的地方)。
检查那里的值是否与上面属性列表中的URL类型中的-> URL 中的值匹配。(并与FacebookAppID匹配)

发布于 2015-06-05 02:09:48
再次检查您的脸书应用程序id。在您的info.plist中添加您注册的脸书应用程序id。还添加了URL标识符,fbXXXXXXXXXXXX(XXXXXXXXX是您以前添加的facebook应用程序id )到info.plist并检查
希望这能帮上忙!
https://stackoverflow.com/questions/30656863
复制相似问题