I am trying to create a login button for Facebook using FBloginView. Below is the code I wrote.
- (void)viewDidLoad
{
[super viewDidLoad];
if(!loginview)
loginview = [[FBLoginView alloc] initWithPermissions:[NSArray arrayWithObject:@"publish_actions, user_photos,status_update"]];
loginview.frame = self.view.bounds;
loginview.delegate = self;
[self.view addSubview:loginview];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
- (void)loginViewShowingLoggedInUser:(FBLoginView *)loginView {
NSLog(@"Logged In");
}
- (void)loginViewFetchedUserInfo:(FBLoginView *)loginView
user:(id<FBGraphUser>)user {
NSLog(@"user Id %@",user.id);
}
- (void)loginViewShowingLoggedOutUser:(FBLoginView *)loginView {
NSLog(@"Logged out");
}
but the login button is not displayed. what is the problem with my code. in the console I get "Recorded".
source
share