Facebook Realtime Update API for page feed

Digital Marketing Facebook Marketing API 3 years ago

8.7K 1 0 0 0

_x000D_ _x000D_ I have gone through Realtime Update API documentation provided by Facebook & got successfully subscribed to the "page" object with the field as "feed", below is subscription url check which I used URL:- https://graph.facebook.com//subscriptions?access_token= which gave me the following response RESPONSE:- { "data": [ { "object": "page", "callback_url": , "fields": [ "feed" ], "active": true } ] }. This response clearly states that App is subscribed for feeds on the pages. But my problem is that I am unable to receive any RealTime Update on the . Below is the CALLBACK_URL php file code ); $method = $_SERVER['REQUEST_METHOD']; if(!empty($method)) { if (!empty($_GET) && strcmp($method, 'GET') == 0 && strcmp($_GET['hub_mode'], 'subscribe') == 0 && $_GET['hub_verify_token'] == VERIFY_TOKEN) { echo $_GET['hub_challenge']; } else if (strcmp($method, 'POST') == 0) { file_put_contents(, "inside post method"); if (isset( $_SERVER['HTTP_X_HUB_SIGNATURE'] ) ) { file_put_contents(, "inside post method"); $post_body = file_get_contents("php://input"); $object = json_decode($post_body); file_put_contents(, json_encode($object)); if ($_SERVER['HTTP_X_HUB_SIGNATURE'] == "sha1=" . hash_hmac('sha1', $post_body, VERIFY_TOKEN)) { //REST OF THE CODE TO SAVE IN DB } } } } else { echo "Invalid Request, might be for testing purpose"; } ?> Facebook is not sending any POST request to my CALLBACK_URL. Please let me know if I am missing anything

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago
_x000D_ Finally I found the answer, just made a POST request to the below URL https://graph.facebook.com/PAGE_ID/tabs?app_id=APP_ID&access_token=PAGE_ACCESS_TOKEN I then started receiving Facebook Realtime Updates
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum


Q

What are the best SEO tools for a personal website? What website or tools should I use to build and...

What are the best SEO tools for a personal website? What website or tools should I use to build and...
Q

Why is keyword research important?

Why is keyword research important?
Q

What is SEO ?

What is SEO ?