I have created a facebook authentication in my iPhone app, I followed this tutorial for that. But except one line of code,that is
- (void)applicationDidBecomeActive:(UIApplication *)application
{
[FBSession.activeSession handleDidBecomeActive];
}
When I use this, it is an error shows:
No visible @interface for 'FBSession' declares the selector handleDidBecomeActive
But still the authentication works fine while I click the logIn button, Problem is my authentication window is just showing "basic info"-i need to access "post on your behalf" also
My authentication window is I need to authenticate
like this like this (as in FB tutorial)
Cant find out the error, Will it be in app creation in Facebook or my authentication error in iPhone coding. If anyone got the error,please help me to clarify
Writing a test project, I cannot repeat your error message;
No visible @interface for 'FBSession' declares the selector handleDidBecomeActive
when compiling with Facebook SDK 3.1.1 (don't have 3.1 handy to test). It would seem to be something version related since the handleDidBecomeActive
is new in the 3.1 version and the message is related to the compiler not seeing the selector.
Also, regarding your permission problem; the permission system has been altered in the 3.1 version to not allow you to request read and write permissions at the same time. Quote from the 3.1 migration documentation;
You are now required to request read and publish permission separately (and in that order). Most likely, you will request the read permissions for personalization when the app starts and the user first logs in. Later, if appropriate, your app can request publish permissions when it intends to post data to Facebook.
I can request read permission on login (which is what you're seeing), but as you're seeing you cannot request post permissions at the same time. If I, as the SDK is hinting, later request that permission, it seems to work as it should.