Facebook graph API : can post on “me/feed” but not on “page_id/feed” (error : 1455002)

我是研究僧i 提交于 2019-12-11 09:07:54

问题


I guess the answer to this one is straightforward but I cannot find it. Any help would be very much appreciated.

I. Use case

The application (back-end in python / django) should write on a facebook page.

II. Symptoms

  • When running the code below on "me/feed", the post is correctly inserted
  • When running the code below on "PAGE_ID/feed", there is an exception (see below in section IV.)
  • The scope of the authorisation is publish_stream, manage_pages
  • Also, the user_token is from a user in the test domain

III. Code

## Getting the user_access_token is dealt with before

h = Http()    

data = dict(message="Hello", access_token=user_access_token['access_token'])

resp, content = h.request("https://graph.facebook.com/PAGE_ID/feed", "POST", urlencode(data))

IV. Exception generated (using /PAGE_ID/feed)

resp : Response: {'status': '400', 'content-length': '119', 'expires': 'Sat, 01 Jan 2000 00:00:00 GMT', 'www-authenticate': 'OAuth "Facebook Platform" "invalid_request" "(#1) An unknown error occurred"', 'x-fb-rev': '976458', 'connection': 'keep-alive', 'pragma': 'no-cache', 'cache-control': 'no-store', 'date': 'Tue, 22 Oct 2013 21:45:20 GMT', 'access-control-allow-origin': '*', 'content-type': 'text/javascript; charset=UTF-8', 'x-fb-debug': 'HFItWh64ob+3hErv+rgYdFzHlRBVHP7Pg0Eg4hvqYlY='}

content str: {"error":{"message":"(#1) An unknown error occurred","type":"OAuthException","code":1,"error_data": {"kError":1455002}}}

来源:https://stackoverflow.com/questions/19529192/facebook-graph-api-can-post-on-me-feed-but-not-on-page-id-feed-error-14

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!