Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up Facebook webhook to monitor a particular page

I've been searching the net on how to setup the Facebook webhooks to check a particular Facebook page (I'm a content editor of) for certain updates.

I read the docs many times about setting up the callback URL whenever a particular "event" happens on that Facebook page, but I never read a straight answer on how to tell which page I want to monitor in.

I was pointed to the {app-id}/subscriptions endpoint, but it doesn't seem to be the one I need.

Could someone provide an idea on how this works?

like image 601
Mr A Avatar asked Jan 14 '16 11:01

Mr A


People also ask

Does Facebook have webhooks?

Webhooks allows you to receive real-time HTTP notifications of changes to specific objects in the Facebook Social Graph. For example, we could send you a notification when any of your app Users change their email address or whenever they comment on your Facebook Page.

How do I check my Facebook webhooks?

In the App Dashboard, go to Products > Webhooks, select User from the drop-down menu, then click Subscribe to this object. Choosing the User object. Enter your endpoint's URL in the Callback URL field and enter a string in the Verify Token field. We will include this string in all Verification Requests.


1 Answers

You need to make a request to /{page_id}/subscribed_apps to create a subscription for updates from a page.

This call needs a page access token, so you need to request manage_pages permission first from an admin of the page. (Not sure if “content editor” role is sufficient for that.)

like image 118
CBroe Avatar answered Oct 07 '22 00:10

CBroe