Reputation: 11
I am trying to retrieve the latest status update for a specific page (not a profile). I've been trying for hours but I can't find the solution. I don't want the user to be logged in before seeing this. Every user has to be able to see it.
I've tried the Grap API and FQL. Nothing seems to work. The closest i've came is just requesting the feed:
https://graph.facebook.com/PAGE_NAME/feed?access_token=ACCES_TOKEN&fields=from,message
This works, but I don't want to retrieve the status updates that other users posted on the pages' wall. I only want to retrieve the status updates that the administrator of the page has posted. I want to put the newest status update on my website, so I don't want the crap that other people can post in the page.
I've tried JavaScript and PHP but I can't get it to work! With FQL I cannot retrieve records from the status table, because they are linked to an uid and not to a page_id. I also can't find the uid from the pages' admin. The solution on this site also doesn't work, because the URL to find the uid has another format now.
Thanks in advance.
Upvotes: 0
Views: 924
Reputation: 41
You can try this http://johndoesdesign.com/blog/2011/php/adding-a-facebook-news-status-feed-to-a-website
The code work well for every Page_ID. Except for the one I need.
I get to step 4 and then get nothing.
{
“data”: [
]
}
Not sure what I’m doing wrong? Any thoughts
Upvotes: 0
Reputation: 43816
Try the 'posts' connection on a page, according to the documentation it's a feed of only posts made BY the page e.g.
/{page id}/posts
You could also use the FQL Stream table
Example:
SELECT post_id, actor_id, message FROM stream
WHERE actor_id = {page id} and source_id = {page id}
Upvotes: 1