First i create facebook object with my appId:
facebook = [[Facebook alloc] initWithAppId:kAppId];
When i call
[_facebook authorize:_permissions delegate:self]
my safari opens up and after i enter my FB username and password, safari closes and everything returns to my app (like it should).
My permissions are:
_permissions = [[NSArray arrayWithObjects:@"read_stream", @"publish_stream", @"offline_access",nil] retain];
The strange thing is that my delegate method – (void)fbDidLogin or -(void)fbDidNotLogin:(BOOL)cancelled is not called like in FB sample app that comes with SDK. In my .h file i implement protocols “FBRequestDelegate,
FBDialogDelegate, FBSessionDelegate” and in .m file i have the necessary methods.
If i try to make a post after that with
[_facebook requestWithGraphPath:@"me/feed"
andParams:[NSMutableDictionary dictionaryWithObject:@"test wall post" forKey:@"message"]
andHttpMethod:@"POST"
andDelegate:self];
i get error “req failed with error The operation couldn’t be completed. (facebookErrDomain error 10000.)”. This must be something related to authorization, but since i get no message after authorize call, i don’t know that to do.
Any ideas?
or
The error object returned has the details about what’s happening.
I suggest to implement that method to get more infos:
For example for my problem gived me that info, and I’ve fixed it:
please try this link
http://www.capturetheconversation.com/technology/-facebook-oauth-2-0-and-the-graph-api-a-tutorial-part-2