Getting started
3rd Party App Intergration
Facebook Credentials
9 min
📘 facebook page upload – authentication & token setup 1\ create an application in the facebook developer console navigate to the facebook for developers site select my apps and click create app located at the top right corner provide the app name and email in step 2 (use cases), select “manage everything on your page ” complete the app creation process 2\ enable required permissions in the app dashboard, click on customize for the “manage everything on your page” use case ensure all permissions listed are enabled 3 configure facebook login in the left sidebar, navigate to facebook login for business add the below mentioned url in the redirect url https //devapi simplita in/api/oauth/linkedin/callback under allowed domains for javascript sdk , include localhost 3000 4 quick start configuration in the left sidebar, select quick start under facebook login for business choose www input the site url, for instance, http //localhost 3000 5 save app credentials access app settings and select the basic tab copy and securely store the following credentials app id app secret 6\ obtain auth code open your web browser and input the following url (ensure to replace your app id) https //www facebook com/v20 0/dialog/oauth? client id=your app id \&redirect uri=http //localhost 3000/ \&scope=pages show list,pages read engagement,pages manage posts,pages read user content \&response type=code 👉 after logging in and granting the required permissions, you will be redirected to http //localhost 3000/?code=auth code copy the auth code from the url 7 exchange the code for a short lived token execute this command in powershell (make sure to replace the placeholder values) curl x get "https //graph facebook com/v19 0/oauth/access token?\\ client id=your app id\\ \&redirect uri=http //localhost 3000/\\ \&client secret=your app secret\\ \&code=auth code" this process will return a short lived token (valid for approximately 1–2 hours) 8 exchange for a long lived token run the following curl command curl x get "https //graph facebook com/v19 0/oauth/access token?\\ grant type=fb exchange token\\ \&client id=your app id\\ \&client secret=your app secret\\ \&fb exchange token=short lived token" you will receive a long lived user token (valid for approximately 60 days) 9\ create a facebook page & retrieve the page token create a new facebook page or utilize an existing one locate your page id in the page settings under page info generate a page access token using the following command curl x get "https //graph facebook com/v19 0/me/accounts?access token=long lived user token" the response will include id → page id access token → page access token (use this for api calls)