Created
November 27, 2018 09:48
facebook login
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to the header of your file, e.g. in ViewController.m | |
// after #import "ViewController.h" | |
#import <FBSDKCoreKit/FBSDKCoreKit.h> | |
#import <FBSDKLoginKit/FBSDKLoginKit.h> | |
// Add this to the body | |
@implementation ViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init]; | |
// Optional: Place the button in the center of your view. | |
loginButton.center = self.view.center; | |
[self.view addSubview:loginButton]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment