Facebook login by sdk but post issue

2019-08-13 03:10发布

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条回答
Root(大扎)
2楼-- · 2019-08-13 03:46

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

查看更多
登录 后发表回答