What is Callback URL in Facebook webhook page subscription?
You can forward the request to localhost with the following:
- Download and install ngrok from https://ngrok.com/download
./ngrok http 8445
- Subscribe your page to the Webhooks using verify_token and
https://<your_ngrok_io>/webhook
as callback URL. - Talk to your bot on Messenger!
Facebook will make a request to that URL from their servers to deliver the updates – so of course it has to be publicly reachable over the internet, which a localhost address obviously isn’t.
Facebook will send a request to that URL if any data for the object and fields that you subscribed for changes. And what the data structure looks like, is described in the docs. For page fields it returns the new content directly; for user fields it will only tell you which fields have changed, so that you can then make a request for that data.
You can only get real-time updates for pages that you have admin access to. And the Public Feed API is not deprecated; but access to it is limited to a small set of Facebook partners. You can not apply to become one – if you absolutely need this kind of data, then you’ll have to contact one of those partners and have them develop a solution for you.