简体   繁体   中英

Posting to my company wall as user via app, posts missing from graph API

I'm posting to my company wall on behalf of the user as part of a competition entry via curl

POST https://graph.facebook.com/'.FB_PAGE_ID.'/feed

This works great and viewing on the web I can see the posts by various test users that I've manually added to the Roles section of my app.

However only 1 of those testers is appearing in my graph API when I get posts

GET https://graph.facebook.com/'.FB_PAGE_ID.'/feed?access_token='.FB_APP_ID.'|'.FB_APP_SECRET

The one account appearing is a dummy one I've made, my primary FB account and a friends account both post to the wall OK and we can see these on the web, but the graph API can't.

Note my app has not been approved yet for publish_actions, but these accounts have been added as test users. I also changed the publish_actions dropdown from "friends only" to "public" and it didn't have any effect.

OK so it seems using APPID|SECRET for the access token isn't good enough. You need the page token instead. Using this returning everything OK. I'm using it in a cron so I hope it doesn't expire...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM