Search code examples
facebookfacebook-graph-apiios7xcode5

Facebook sharing Error : (#200) The user hasn't authorized the application to perform this action


When I try to post link on wall getting this error,

Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xb2eecb0 {com.facebook.sdk:HTTPStatusCode=403, com.facebook.sdk:ParsedJSONResponseKey={
    body =     {
        error =         {
            code = 200;
            message = "(#200) The user hasn't authorized the application to perform this action";
            type = OAuthException;
        };
    };
    code = 403;
}, com.facebook.sdk:ErrorSessionKey=<FBSession: 0xb3da730, state: FBSessionStateOpen, loginHandler: 0xb3daf20, appID: 569283773190376, urlSchemeSuffix: , tokenCachingStrategy:<FBSessionTokenCachingStrategy: 0xb374840>, expirationDate: 2014-08-16 11:51:07 +0000, refreshDate: 2014-06-17 12:29:24 +0000, attemptedRefreshDate: 0001-12-30 00:00:00 +0000, permissions:(
    "publish_stream",
    "publish_actions",
    "manage_friendlists"
)>}

Edit :

I can share the admins feed, but when try to share other user it is failed.

When authorize the facebook it shows the window

enter image description here


Solution

  • The error is quite straight-forward. You have not taken the permission from your user to publish a post.

    Just add the required permission while logging in the user. The permission for publishing is publish_actions.

    Read more about how to ask for the permissions here.

    Edit

    Other users are not able to share because from v 2.0 you have to submit your app for the login review to use the publishing permissions. To submit for review go to settings > status and review

    Login Review