I have implemented FBLoginView
on my previous version of my iOS app, suited for iOS 6&7. Recently, after the iOS 8 release, I upgraded my Facebook Framework to the latest version and below is the result of implementing the same FBLoginView
button.
I tried using the previous version of the Facebook Framework, but I still experience the same problem.
Below is the implementation if the FBLoginView
programmatically in my code
self.fbBtn = [[FBLoginView alloc] init];
self.fbBtn.frame = CGRectZero;
self.fbBtn.readPermissions = @[@"public_profile", @"email"];
self.fbBtn.delegate = [FacebookDelegateHelper sharedObject];
[self addSubview:self.fbBtn];
[self.fbBtn setTranslatesAutoresizingMaskIntoConstraints:NO];
What am I doing wrong?
The one that work would be:
This should make your button appear. Then the rest of your code could be in your delegate where
FBLoginViewDelegate
has been declaredThere is an example named HelloFacebookSDK in FacebookSDK for your reference.