problem with intergating facebook session
I am using Facebook in my music application where user post comment on wall paper after listening the song开发者_C百科s . So problem arises that user have to login again for next song. so please provide me code for session retains when he clicked on the tab where it written "keep me login".
Thanks
I have a file called FacebookHelper.m, here is the code there:
- (id)init {
if (self = [super init]) {
session_ = [[FBSession sessionForApplication:kAPIKey secret:kApplicationSecret delegate:self] retain];
[session_ resume];
}
return self;
}
If you want to control the login dialog yourself, here is the code:
- (void)loginByShowingDialog {
self.isDialogShown = YES;
FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:self.session] autorelease];
dialog.delegate = self;
[dialog show];
}
For your cases, I think you only need to get the session back and resume it.
精彩评论