You are viewing Skygear v1 Documentation.Switch to Skygear v0 Documentation

User login with Facebook

This article teaches you how to setup Facebook login in your application.

Setup Facebook application

  1. Create your Facebook application in Facebook developer portal.

    Facebook developers

    Facebook create application

  2. Add Facebook login in product.

    Facebook add login

  3. In Facebook login setting, add following URL to Valid OAuth redirect URIs. Replace ${APP_NAME} with your app name.

    https://${APP_NAME}.skygeario.com/sso/facebook/auth_handler
    

    Facebook config redirect uris

  4. Go to Settings > Basic to make your application public.

  5. Save your App ID and App Secret from Facebook portal.

    Facebook app id and secret

  6. Go to Skygear portal, User Auth > Social Login. Enable Facebook in social connections and input your App ID and App Secret.

    Facebook Skygear portal

  7. Optional: Select the default permissions from Skygear portal, it will be used when user login with Skygear SDK. You can still overwrite it by providing another set of scope in the SDK call.

Login with Facebook through Skygear SDK