Note that there are some explanatory texts on larger screens.

plurals
  1. PONot getting post notification from facebook for realtime api
    primarykey
    data
    text
    <p>I'm trying to get the realtime updates to my app from facebook using their realtime api. I have configured my subscription.</p> <pre><code>{ "data": [ { "object": "user", "callback_url": "https://myappname.herokuapp.com/realtime.php", "fields": [ "activities", "feed", "is_app_user", "likes", "online_presence", "photos", "picture", "status", "wall_count" ], "active": true } ] } </code></pre> <p>I have created an endpoint which simply logs the request when I get a post request. But I don't seem to be getting any calls from facebook. If I manually do a post to the end point, it logs the post body json. I have checked the heroku logs but there is no trace of post request form fb, only my manual request is present.</p> <pre><code>&lt;?php $method = $_SERVER['REQUEST_METHOD']; if ($method == 'GET' &amp;&amp; $_GET['hub_mode'] == 'subscribe') { echo $_GET['hub_challenge']; } else if ($method == 'POST') { $data = file_get_contents("php://input"); $json = json_decode($data, true); error_log("update recieved"); error_log('updates = ' . print_r(json, true)); pg_close($db); } ?&gt; </code></pre> <p>I have did a callback request test specified by <a href="https://graph.facebook.com/yourappid/subscriptions?access_token=youraccesstoken&amp;object=user&amp;fields=feed&amp;verify_token=yourownsecretstringsetinyourphpfile&amp;method=post&amp;callback_url=http://www.yourwebsite.com/facebook_subscribe.php" rel="nofollow">https://graph.facebook.com/yourappid/subscriptions?access_token=youraccesstoken&amp;object=user&amp;fields=feed&amp;verify_token=yourownsecretstringsetinyourphpfile&amp;method=post&amp;callback_url=http://www.yourwebsite.com/facebook_subscribe.php</a> which returned me null indicating subscription is success.</p> <p>I have made a few status updates and likes but I'm not getting any updates from fb. Am I missing something out here? </p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload