First of all to understand what is a Facebook access token and why it is required?
A Facebook access token contains some permissions based on an application, and allows to fetch permissible user data from user profile. This data is then, can be used by application owner for any usable purpose.
Here is a simple step by step tutorial that describes you to create Facebook access token for web application
There Are Two Methods To Create Facebook Access Token,
(I) From Your Extension,(For Https site)
(II) From Webkul.Com/Accesstoken/
The First Method Is given below:
Create facebook web application:
Step 1: Go to developers.facebook.com
Step 2: Click on “Log in” to get into the developer account.
Step 3: Enter your user credentials and login
now. Read More
Step 3(a)(i): Click on “Get Started” as shown below.
Step 3(a)(ii): Click ‘Add your first product’ to proceed for app creation
Step 3(a)(iii): Click ‘Next’
Step 3(a)(iv): Enter any app name and valid email id and click ‘Next’
Step 3(a)(v): Simply ‘skip’ the step
Step 3(b): In ‘My Apps’ click ‘Add a New App’
Step 4: Under ‘Add Products’ tab Set up a Facebook Login
Step 5: Under ‘Quickstart’ of ‘Facebook Login’ tab click ‘Web’
Step 6: Under ‘Quickstart’ of ‘Facebook Login’ tab, enter your site URL and click ‘Save’
Step 7: Under ‘Settings’ of ‘Facebook Login’ tab set these settings.
Step 9: Under ‘Advanced’ of ‘Settings’ tab set these settings.
Step 10: An additional tab ‘App Review’ is added. To submit your app for review, make your app public and ‘save’. To know the process of Facebook App Review Click here.
Note: In App Review process you need to make app to public and set all the user permission. If the app is in developer mode then you will only get your profile data.
Your app is successfully set, now you have to get ‘App ID’ and ‘App Secret’
Step 11: Under ‘Basic’ of ‘Settings’, below ‘App Secret’ click ‘Show’
Step 12: Copy and use parameters.
GENERATE FACEBOOK ACCESS TOKEN:
Step1: Now Copy the App ID and App Secret and goto your module configurations and paste them in required fields. Click Save and then click ‘Get Access Token’
After clicking “Get Access Token”, you will be redirected to Facebook. After login you will find the “Access Token”.
Step2: Click continue
Now choose the Facebook page from list.
After You need to give various permission to Yes as given in below screenshot.
Step3: Page will redirect with your facebook access token in result, simply save module again
Step4: Page will redirect with your Facebook profile, pages, groups selectable options. Select accordingly and save module again.
How to create Access Token For Non Https Site From Webkul.Com/Accesstoken/ :
Firstly you need to follow the same instructions as given in above method. First of all, create an app and configure various settings of app submission. In Facebook login settings, enter the site URL and set the required OAuth Redirect URLs as given in below screenshot.
Now once you get the credentials, enter the APP ID and SECRET KEY of your Facebook app to Webkul Access Token Generator to get the access token.
You will be redirected to Facebook end. Now Click on Continue.
Here you will find the Access Token and User Id.