Gagan
Gagan

Reputation: 1923

Facebook App webhooks: Callback URL & Page tab

Hi I am held up with couple of problems from past couple of days. Please can anyone help me out.

  1. I want to get the real time updates of my facebook page. I created an App & added it as the Page tab but I am getting the below message when i clicked the tab in the facebook page.

Method Not Allowed Error 405

  1. Also when subscribing the real time updates/webhooks in facebook, is it necessary to give domain name/callback.php in callback URL? I mean I just want to test the flow right now and don't want to buy a domain for testing.

  2. Also when i am putting this https://graph.facebook.com//subscriptions?access_token=**** I am just getting

    { "data": [

    ] }

Upvotes: 0

Views: 1935

Answers (1)

C3roe
C3roe

Reputation: 96306

  1. Subscribing to a page for updates is not done by installing it as a page tab app any more, but by making a POST request to /page/subscriptions

Method Not Allowed means your server did not accept a POST request to the URL. Facebook makes a POST request to load an app into a page tab. If you tried to use that same URL as your webhook callback URL, you need it to accept POST requests as well.


  1. Of course the URL needs to be reachable from the outside, otherwise Facebook could not make a POST request to it. As far as I know Facebook does not accept IP addresses, you need to use a domain name. Plus, webhooks now require an HTTPS URL, with a valid SSL certificate. Self-signed certificates are not accepted, so you practically have no other choice than to use a "real" domain, dyndns or something won't work.

  2. That's because you have not actually subscribed your app for updates of the page. Again, that has nothing to do any more with page tabs, it needs a POST request to that endpoint.

Upvotes: 1

Related Questions