- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在关注 this将 Facebook 登录与 Messenger 集成的教程。当我编译代码的第一部分时,我收到错误:
由于未捕获的异常“NSInternalInconsistencyException”而终止应用程序,原因:“您必须通过调用 +initializeFacebookWithApplicationLaunchOptions 来初始化 PFFFacebookUtils”
我遇到了多个线程,包括 this一个,但是这已在我已经使用的新版本中修复,因此不能用于解决我的问题。
我连接了一个运行教程代码的按钮:
- (IBAction)loginWithFacebook:(id)sender
{
// Set permissions required from the facebook user account
NSArray *permissionsArray = @[ @"user_about_me", @"user_relationships", @"user_birthday", @"user_location"];
// Login PFUser using Facebook
[PFFacebookUtils logInInBackgroundWithReadPermissions:permissionsArray block:^(PFUser *user, NSError *error)
{
if (!user)
{
NSLog(@"Uh oh. The user cancelled the Facebook login.");
}
else if (user.isNew)
{
NSLog(@"User signed up and logged in through Facebook!");
}
else
{
NSLog(@"User logged in through Facebook!");
}
}];
}
另外,我的 AppDelegate.m 有:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
return YES;
}
最佳答案
该指南没有提及使其工作所需的所有代码。 Parse 在他们的 iOS Guide 中确实有更多信息.要具体解决此问题,请在您的 didFinishLaunchingWithOptions
方法中,将您的 FBSDKApplicationDelegate
调用替换为以下内容:
[PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:launchOptions];
关于ios - PFFacebookUtils -,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34397142/
我正在关注 this将 Facebook 登录与 Messenger 集成的教程。当我编译代码的第一部分时,我收到错误: 由于未捕获的异常“NSInternalInconsistencyExcepti
当我在我的应用程序中调用以下 Objective C 代码时,出现异常。 [PFFacebookUtils logInInBackgroundWithReadPermissions:permi
我试图在使用 Parse.com 服务的应用程序中提供一些非常简单(正如我所想)的功能。我需要的只是允许用户通过 Facebook 创建帐户并通过 Facebook 再次登录。 问题是 PFFaceb
我的 AppDelegate 中的下面一行出现了 No such module 'PFFFacebookUtils' 错误: import PFFacebookUtils 我已经检查过 ParseFa
我遇到了此处提到的类似问题:https://www.parse.com/questions/error-when-trying-to-reauthorise-facebook-user 当我的应用程序
为了在 iOS 中实现 Facebook 登录,我已完成此处提到的所有操作 (https://www.parse.com/docs/ios_guide#fbusers/iOS)。 问题是我有一个编译错
我正在将我的 iOS 应用程序与 Parse 和 Facebook 集成。它在我的 iPhone 4s 上运行良好——运行 iOS 6——但是当我在我的 xCode 5 模拟器上尝试测试帐户时它失败了
我在我的项目中使用cocoapods,但是当我使用时: [PFFacebookUtils initializeFacebookWithApplicationLaunchOptions:launchOp
我正在运行最新的 Parse 和 FB SDK(今天下载:2015 年 12 月 4 日)。代码:7.1iOS 9.0 如果我使用 Facebook 登录按钮,它工作正常,但我想使用解析登录集成。调用
有人知道 PFFacebookUtils 框架在哪里吗?或者我可以从哪里下载它。当我导入 PFFacebookUtils 框架时,它给了我错误“没有这样的模块”,并且我在计算机上的文件中找不到它 最佳
我知道这里已经有人问过这个问题,但对我来说没有任何用处。我无法从 Facebook 注销。无论我做什么,我仍然看到“您已经授权 AppName”屏幕。 我试过: [[PFFacebookUtils f
嘿,下面的代码在某种程度上不适用于 segue。它返回: 警告:尝试呈现不在窗口层次结构中的 View ! 代码在 IBAction 按钮中运行。然后我在没有 PFFFacebookUtils 代码的
使用最新的 FB iOS SDKS 和 Parse,以及 ParseFacebookUtilsV4 pod 'FBSDKCoreKit' pod 'FBSDKShareKit' pod 'FBS
我正在使用 facebook login 测试一个应用程序。我制作了一个按钮,当我点击它时,Facebook 页面出现,输入密码后它消失了。问题是来自 [PFFacebookUtils loginWi
当我尝试在 appdelegate.m 中初始化两者时,Xcode 6 beta 可以识别 Parse 但不能识别 PFFFacebookUtils 这是我如何集成 Facebook SDK 我正在使
在我的应用程序中,我通过 Parse 的 PFFFacebookUtil 类登录用户。如果用户存在于手机上(即在“设置”>“Facebook”中登录到 FB),那么一切都会按预期进行。 但如果他们未通
我正在尝试将 facebook 登录集成到我的解析应用程序中。我遵循了解析教程中提到的每一步。在下面的代码中,我遇到了编译错误。 func application(application: UIAp
我一直在搜索并尝试使用 PFFacebookUtils 和 Parse 解决此问题,用户通过 Facebook 登录但未保存在 中解析数据浏览器。在此过程中,用户取消选择权限(例如电子邮件),这会导致
我试图让用户使用 parse 登录 facebook,但收到 PFFFacebookUtils、Parse、FBAppCall 和无效的 DidBecomeActive 的编译器错误“使用未解析的标识
我尝试使用 Facebook 用户 Parse 登录。每次使用 logInWithPermissions 时,权限都是 nil。以下代码始终产生相同的输出: [PFFacebookUtils logI
我是一名优秀的程序员,十分优秀!