简体   繁体   English

通过应用程序以用户身份发布到我的公司墙上,图API中缺少发布内容

[英]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 我代表用户通过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 但是,当我收到帖子时,这些测试者中只有1个出现在我的图形API中

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. 出现的一个帐户是我创建的虚拟帐户,我的主要FB帐户和一个朋友帐户都发布到了墙上,可以在网上看到这些,但是图形API却看不到。

Note my app has not been approved yet for publish_actions, but these accounts have been added as test users. 请注意,我的应用尚未获得publish_actions的批准,但是这些帐户已被添加为测试用户。 I also changed the publish_actions dropdown from "friends only" to "public" and it didn't have any effect. 我还将publish_actions下拉列表从“仅限朋友”更改为“公开”,但没有任何效果。

OK so it seems using APPID|SECRET for the access token isn't good enough. 好的,因此使用APPID | SECRET作为访问令牌似乎不够好。 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... 我在cron中使用它,所以希望它不会过期...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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