“FBRequest requestForMe”无法识别的选择器 [英] "FBRequest requestForMe" Unrecognized selector

查看:126
本文介绍了“FBRequest requestForMe”无法识别的选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第一次发帖。

昨天刚刚下载了FB iOS SDK(10/10/2012)

Just downloaded the FB iOS SDK yesterday (10/10/2012)

我已经完成了获取已开始在
列出的步骤 https:// developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/

I have gone through the Getting Started steps listed at https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/3.1/

我正在尝试调用[FBRequest requestForMe] ]

I'm trying to call [FBRequest requestForMe]

作为此测试代码的一部分

As a part of this test code

if (FBSession.activeSession.isOpen) 
    {
        [[FBRequest requestForMe]startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {}];
    }

测试代码在现有项目中实现。代码编译/构建正常;没有链接器错误。它位于viewDtroller里面的viewDidAppear方法中,按下按钮打开它。

The test code is implemented inside of an existing project. The code compiles/builds fine; there are no linker errors. It is within a viewDidAppear method inside of a viewcontroller that is opened with a button press.

我在[FBRequest requestForMe]调用上遇到此运行时错误:
[FBRequest requestForMe]:发送到类0x667bb0
0x667bb0的无法识别的选择器是FBRequest。

I am getting this runtime error on the [FBRequest requestForMe] call: [FBRequest requestForMe]: unrecognized selector sent to class 0x667bb0 0x667bb0 is FBRequest.

我确信我可以提供更多信息,我不确定还有什么可以提供帮助。让我知道,我会回复。

I'm sure there's more information I could give, I'm not sure what else would help. Let me know and I'll reply.

问题:什么会使requestForMe选择器无法识别,因为知道编译和链接根本不会抱怨该行?

Question: What would make the requestForMe selector be unrecognized, knowing that compiling and linking doesn't complain about that line at all?

推荐答案

所以,我的第一篇文章很棒...我正在研究的遗留代码有一个以前的Facebook实现。它已经有了FBRequest.h / m。链接器不知何故混淆但从不对我大吼大叫?

So, great first post on my part... The legacy code I was working on had a previous implementation of Facebook. It already had a FBRequest.h/m. Somehow the linker got confused but never yelled at me?

我从构建目标中删除了旧的FBRequest文件,现在一切都很顺利。
感谢阅读!

I removed the old FBRequest files from the build target and all is well now. Thanks for reading!

这篇关于“FBRequest requestForMe”无法识别的选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆