我正在尝试发布到我使用 Python facebook-sdk 管理的 Facebook 页面,但我不知道该怎么做。我可以像这样发布到我的 Facebook 墙:
graph.put_object("me", "feed", message='My message goes here')
我可以像这样获取我管理的页面和访问 token :
fbpages = graph.request('me/accounts')
但我找不到任何资源来指示如何实际使用访问 token 发布到页面。我想它会是这样的:
graph.put_object("me", "page id", "access token", message='My message goes here')
我实际上如何使用 Python facebook-sdk 来执行此操作?
我正在使用“pythonforfacebook/facebook-sdk”。
最佳答案
感谢 WizKid 为我指明了正确的方向。对于其他遇到此问题的人,它是这样解决的:
graph = facebook.GraphAPI(page_access_token)
graph.put_object("page id", "feed", message='My message goes here')
关于Python facebook-sdk 发布到页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24052651/