How to get 'Facebook Access Token', 'App ID' & 'App Secret'?

May 5, 2018 FC Admin 0 comments

How to get ‘Facebook Access Token’, ‘App ID’ & ‘App Secret’?

The Facebook API let you allow post on timeline from your website or web application. To get Facebook Access Token you need to create a Facebook App in your Facebook Developers account. If you don’t have a Facebook Developers account, create a one now.

Here in this article we will explain how you can create Facebook App and get Facebook Access Token with App ID and App Secret.

Create a New Facebook App

  • Login to your Facebook Developers account and click on My Apps > Add New App as shown below.
  • Enter App display name and contact email and click on Create App ID button.
  • Your Facebook App is created now and you will be taken to your App Dashboard.
  • Select the App which you wish to view.
  • In left side panel select Settings > Basic to view App detail panel.
  • In App Basic detail panel you will find your App ID and App Secret.
  • Update App other details like Privacy Policy URL, Terms of Service URL, App Icon and Category.

To know more about Facebook App Creation click here.

Generating Access Tokens

When someone connects with an app using Facebook Login and approves the request for permissions, the app obtains an access token that provides secure access to Facebook APIs.

  • Open Facebook Graph API Explorer.
  • You will show an Application button in top-right corner which will be set to ‘Graph API Explorer’ by default.
  • Select your App instead ‘Graph API Explorer’.
  • Click on Get Token > Get User Access Token button and you will see a permissions window.
  • Make sure publish_pages, manage_pages and publish_actions permissions are ticked and then click on Get Access Token button.
  • Now click the Get Token button again and select your Facebook page.
  • You have your Access Token and now it need to convert into Non-Expiring Access Token.
  • To convert token into Non-Expiring Access Token pass App ID, App Secret and Access Token in following URL.{your_appid}&client_secret={your_app_secret}&fb_exchange_token={your_access _token}

Now you will provided Non-Expiring Access Token.