Facebook login by sdk but post issue

情到浓时终转凉″ 提交于 2019-12-24 13:24:36

问题


This is what my logcat shows as a response

{
 Response:  responseCode: 403, 
 graphObject: null, 
 error: {
     HttpStatus: 403, 
     errorCode: 200, 
     errorType: OAuthException, 
     errorMessage: (#200) The user hasn't authorized the application to perform this action
  }, 
 isFromCache:false
}

I'm unable to post to facebook due to this error. What are the steps to authorize the application?


回答1:


I guess you need to issue an HTTP POST to that endpoint to publish a new feed story, facebook provides the "method=post" GET parameter to "fake" a post, this might work for you.

https://graph.facebook.com/USER_ID/feed?access_token=TOKEN&message=HelloFacebook&method=post

w.r.t to response you will get an id as :

{
   "id": "499801468_1001264776039"
}

for more details please refer

for GraphAPI - http://developers.facebook.com/docs/reference/api/#publishing

Also please check your permission tag



来源:https://stackoverflow.com/questions/18184429/facebook-login-by-sdk-but-post-issue

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