I have printed content of POST but it is giving me value "1".
Facebook does not send the data as a “normal” POST request, it sends JSON directly. Therefor PHP will not populate $_POST – you need to read the raw response body directly, and then decode it.
file_get_contents('php://input')
, and then json_decode
.
Also, there is no configuration with which I can set which facebook page I need to track. How can I set it?
You need to subscribe your app to the page to receive updates, see https://developers.facebook.com/docs/graph-api/reference/page/subscribed_apps