The Facebook Events Access Token feature in the WP Social Ninja plugin allows you to easily retrieve and display events from your Facebook page on your WordPress website.
Let’s dive into this article to learn how to accomplish it.
Note that, If you already have a Facebook Developer account, you can skip Step 8
- Go to the Facebook Configuration page & you will get the Credentials Type & you need to select Connect Events Access Token option from the dropdown.
2. After selecting the Connect Events Access Token option, new options will appear below where you need to put the Facebook Page ID & Event Access Token.
3. To get the Facebook Page ID & Event Access Token, follow this link – developers.facebook.com
4. After going to the provided link, click the Log In option in the top right corner. To log in, you need to use your personal Facebook account.
Note that, You must log in with your personal Facebook profile’s username and password. Businesses cannot register as developers on Facebook; only individuals may do so.
5. Click on Get Started if you are signing for the first time into the Facebook Developer Portal & then the Next button.
6. Now, choose what best describes you, keeping in mind that the following steps are unimportant, and when finished, click the Complete Registration button.
7. Now, you need to create a new App by going to the Create App button.
8. After selecting the Create App button, in the Create an App window, click on the None & then the Next button.
9. Now, enter your App Name and App Contact Email, as well as your Business Account, which is completely optional.
10. Click on Create App button when you are done.
11. For security purposes, re-enter your Facebook password in the box & click Submit.
Make sure your app is in Development mode and do not make it Live
Now that your app is set up, you do not need to go through Business Verification. This is only required for live public-facing apps, not for internal apps that are left in development mode.
Retrieving a Page Access Token #
- Now, it’s time to get Access Token. For that, go to Settings → Basic to get the App Information & on the right side of the page, App ID & App Secret will appear.
- Copy the App ID and App secret for later use.
- After you have copied them, next, get the Access Token. Go to this link – developers.facebook.com/tools/explorer/
- Select your previously created App from the dropdown & Click on the Generate Access Token key button.
- A popup model will appear where you must click the Continue as – button.
- Copy and paste both page_events and pages_read_user_content into the Add a permission section to add them as permissions to your app.
- And then click Generate Access Token again.
- Click Continue as – in the popup modal again.
- Choose One Facebook page from which to display events & click on the Next button.
Note that you don’t need to select multiple pages from the list!
You must be an administrator of the Facebook page from which you want to display events; otherwise, no events will be displayed.
- You can overlook the message Submit for Login Review. The app will remain in development mode and will not be submitted for review & Lastly, click on the Done button.
- A temporary (1 hour) Access Token will be provided once you have responded to the questions. In order to prevent this temporary Access Token from expiring, copy and paste it into the form in the following step.
- Go to your Facebook App page & copy the App ID, App Secret & Access Token you created before. Paste them below boxes.
- At last, click on the Extend my token button and copy the Access Token for later use.
- This is your Event Access Token, paste it to the required field of the WP Social Ninja dashboard. And to get the Page ID, you need to go to the link.
- Now, go to the Facebook Feed → click on the Continue with Facebook button & then a popup will appear.
- Select Continue as – (your Facebook ID)
- Now you will get your Page ID and an Access Token (Ignore the Access token for now, you won’t need it for creating your event feed).
- Only copy the Page ID & paste it to the Facebook Configuration Page of WP Social Ninja.
- When you’ve put everything in the required boxes, click on the Connect button to complete the configuration process.
- That’s all; your connected Facebook page will be shown.
This is simple get the Event Access Token to configure Facebook!
To display Facebook Events from a specific page, you can check this Documentation.