“FBRequest requestForMe” Unrecognized selector

拥有回忆 提交于 2019-12-20 04:29:06

问题


First time posting.

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

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

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) {}];
    }

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.

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.

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


回答1:


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?

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



来源:https://stackoverflow.com/questions/12847953/fbrequest-requestforme-unrecognized-selector

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!