I\'m using a pop up Facebook dialog for the user login and the publishing of a post on his/her stream
NSMutableDictionary* params = [NSMutableDictionary dict
The Mike Bretz method worked for me.
I have a class (a view Controller) that has a button that does the following :
NSMutableDictionary * params = [NSMutableDictionary dictionary];
[params setObject:FACEBOOK_APP_ID forKey:@"client_id"];
[[SHARED_APP facebook] setSessionDelegate:self];
[[SHARED_APP facebook] dialog:@"oauth" andParams:params andDelegate:self];
where my controller also conforms to the protocol FBSessionDelegate
and SHARED_APP is my [[UIApplication sharedApplication] delegate]
I implemented the method
-(void)fbDidLogin {
NSLog(@"fbDidLogin");
}
and it worked !
I can then make subsequent calls to methods like
[[SHARED_APP facebook] requestWithGraphPath:@"me/friends" andDelegate:self];
to retrieve JSON data (with FBRequestDelegate) Be careful, for every request, to test the return value such as explained here http://developers.facebook.com/blog/post/500 to keep looking that you're still authenticated
Hope it helps