Pete
Pete

Reputation: 905

GET Facebook wall posts of admin

What started off as easy as "Let's put all our brand's Facebook posts on our website" has turned out much more difficult.

The situation:

  1. There are multiple admins that manage the Facebook fan page (20+)
  2. RSS feeds no longer seem to work with some brand pages
  3. I have registered an APP ID, and am getting back an access token at an application level like so:

    https://graph.facebook.com/oauth/access_token?grant_type=client_credentials&client_id=AAAAAAAA&client_secret=BBBBBBBB;

Below are some varying cases and what they return. All examples below assume the access token is retrieved using the URL above

Case 1: /posts

Will return the wall posts of the parent account (the one who started the Facebook fan page), and not the admin's who administer it.

https://graph.facebook.com/PAGE_NAME/posts?access_token=XXXXXXXXXX;

Case 2: /feed

Will return the wall posts by all other users, and NOT the admins or page owners

https://graph.facebook.com/PAGE_NAME/feed?access_token=XXXXXXXXXX;

Case 3: FQL

Will return same results as Case 1, note DDDDDDD = Page UID

SELECT post_id, created_time, message FROM stream WHERE source_id=DDDDDDDD AND actor_id=DDDDDDDD

Now, funnily enough, when I use Facebook's Graph API Explorer (logged in of course), and I call Case 1 above "/posts" I DO get all the posts (including the ones from all page admins and owners). This is exactly what I want!

So why am I here? Because of the access token issue. This is a stream to be used on a website, i.e. there is no requirement for a user to connect to Facebook as we don't need their permissions nor to access their data, which is why I'm using the application access token.

Upvotes: 1

Views: 1084

Answers (1)

Anthony Choi
Anthony Choi

Reputation: 106

Is manage_pages permission given to your app token? I hope this link helps: http://developers.facebook.com/docs/authentication/pages/

Upvotes: 1

Related Questions