To allow the user to sign up for a giveaway with their Facebook account, follow the steps below to get started.
- Log into your Facebook account.
- Go to https://developers.facebook.com/, then click on My Apps at the top right.
- Click Create App then select Consumers as the app type.
- Add the required Display Name and Contact Email. Then, click Create App ID.
- After creating the app, copy your App ID at the top of the page.
- Go to the giveaway’s Settings > Setup > Social Logins panel, turn on the Allow Logging In with Facebook option. Then, paste the App ID (copied in Step 5) into the Facebook App ID (required) input box.
- On your Facebook for Developers page, click the Set Up button within the Facebook Login app product item.
- Select Facebook Login > Settings and enter your site domain (eg. “mysite.com”) into the Valid OAuth Redirect URIs input box. Then, enable the Login with JavaScript SDK option and enter your site domain into the Allowed Domains for JavaScript SDK input box. After entering the site domain in both the required input boxes, click the Save changes button at the bottom of the page.
- Select Settings > Basic on the left panel and enter all the required information needed, then click the Save changes button at the bottom of the page. This information may include your app icon, Privacy Policy URL, User Data Deletion Instructions URL, and your site domain (eg. “mywebsite.com”) in the App Domains input box.
- Select App Review > Permissions and Features on the left panel and find the “public_profile” permission in the list.
- Click the Request Advanced Access button, check the required agreement box in the confirmation popup/modal box. Then, click the Confirm button.
- Don’t forget to switch your App Mode to Live!
Here are a few Facebook Developer documentation with important details on releasing your Facebook app for use on a live/production site.
All apps must be set to Live Mode for production useFacebook App Review
- That’s it! Your users will be able to log in with their Facebook account.
Troubleshooting Tips
- If users aren’t able to sign up or use any of the Facebook actions, it’s possible that your Facebook Login app doesn’t have the required permission to access the user’s email address.
You may quickly ensure that the “email” feature has been granted Standard Access level (minimum) in your Facebook developer app’s App Review > Permissions and Features dashboard. You may find this feature by entering “email” in the filter box.
After requesting access to this feature and ensuring that it’s active, you can then test if you’re able to sign up with Facebook and use any Facebook actions.