Everything is set up just fine. I can receive and log the data that facebook pushes to my callback server.
I'm monitoring the feed for updates, specifically posts. When I post as the page, I can get the post_id and call the graph api to get the details.
When I post as a user to the page I get this information:
{
"object":"page",
"entry":[
{
"id":"**[PAGE ID]**",
"time":1385465393,
"changes":[
{
"field":"feed",
"value":{
"item":"post",
"verb":"add",
"post_id":**[INVALID POST ID]**,
"sender_id":**[USER WHO SENT POST]**
}
}
]
}
]
}
Which is the typical output. Note that I have removed the identifiers and replaced them with placer holders.
When I extract the post_id and query it using the graph API it returns the following message:
{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }
I have:
So I'm stumped.
Why is Facebook not sending me the correct post_id? Why is it sending me one that is invalid? And how do I get around this considering my app is central to the use of real time updates?
So this turned out to be a facebook-related issue. I basically had to modify my code to take into account that RTU sent you a differently formatted post ID depending on whether you were a page administrator or an average user.
If you're a page admin the format of the page ID will be [PAGE ID]**_[POST ID]**, but if you're an average user RTU will just send you the post ID without the page ID prefixed.
A little bit confusing... Not sure if a bug has been filed with Facebook just yet.