Skip to content

Instantly share code, notes, and snippets.

@RomainMaillot13
Created November 27, 2018 09:48
Show Gist options
  • Save RomainMaillot13/e36ac04429c8240829be6c7308f97309 to your computer and use it in GitHub Desktop.
Save RomainMaillot13/e36ac04429c8240829be6c7308f97309 to your computer and use it in GitHub Desktop.
facebook login
// 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