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
You only have to implement that method within your App Delegate as this...
- (void)fbDidLogin {
NSLog(@"DID LOGIN!");
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:[[self facebook] accessToken] forKey:@"FBAccessTokenKey"];
[defaults setObject:[[self facebook] expirationDate] forKey:@"FBExpirationDateKey"];
[defaults synchronize];
}
The mistake your are making is that you are implementing this method in your Custom View.
EDIT:
The above code works perfect, but if you want to get the control on your custom viewcontroller you can maintain that code on your appDelegate and add this code on your CustomViewController:
delegate= (YourAppDelegate *)[[UIApplication sharedApplication] delegate];
[delegate facebook].sessionDelegate=self;
So, you will able to override fbDidLogin within your CustomViewController, don't forget add the FBSessionDelegate on your CustomViewController.h (Header).
Kind Regards.