Creating your own custom Sign In With Facebook button

suggest change

Sometimes we want to design our own UI for “Sign In With Facebook” button instead of the original button that comes with FacebookSDK.

  1. In your storyboard, drag your UIButton and set it however you want it to be.
  2. Ctrl + drag your button to your view controller as IBAction.
  3. Inside the IBAction method you will have simulate a tap on the actual Facebook button as follow:


let loginButton = FBSDKLoginButton()
loginButton.delegate = self
// Your Custom Permissions Array
loginButton.readPermissions =
// Hiding the button
loginButton.hidden = true
// Simulating a tap for the actual Facebook SDK button


FBSDKLoginButton *FBButton = [FBSDKLoginButton new];

// Your Custom Permissions Array
FBButton.readPermissions = @[@"public_profile",
FBButton.loginBehavior = FBSDKLoginBehaviorNative;
[FBButton setDelegate:self];
[FBButton setHidden:true];
[loginButton addSubview:FBButton];

[FBButton sendActionsForControlEvents:UIControlEventTouchUpInside];

You’re done.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents