ios-Facebook SDK 3.0 Error 5 When Posting Status Update

前端 未结 3 1698
予麋鹿
予麋鹿 2020-12-30 06:23

I am trying out adding facebook integration in an app using the new (beta) facebook ios sdk 3.0. All I would like to is post a status update to facebook. I used a FBLoginVie

相关标签:
3条回答
  • 2020-12-30 06:54

    Use a proxy !

    FB ios SDK is just a wrap to an HTTP request to graph.facebook.com/....?access_token=.....

    So you can easily replicate the request or use an HTTP proxy to see the real server answer (which is not error 5 !).

    0 讨论(0)
  • 2020-12-30 06:57

    com.facebook.sdk error 5 is always irritating while working with Facebook iOS sdk. Most of the times it comes with addional in console Error: HTTP status code:400. Its a perception that there is a bug in Facebook iOS sdk that produces this error randomly. I think this error occurs for some certain reasons and sdk do not provide actual reason of error when it occurs.

    Several Possible Reasons

    • Every request in sdk is accomplished with completion blocks that we actually pass as argument in completionHandler. This error occurs when a block is in progress and made another request. A simple example might be If you have written request to post on Facebook (startForPostStatusUpdate::) on some button action. On single button tap it would work fine but if you double tap on button it will throw this error com.facebook.sdk error 5

    • If you are trying to post when your current session is not opened. e.g. Once sign in with Facebook then kill the app then reopen and then try to share on Facebook, Result -> com.facebook.sdk error 5. In this case try to reopen session using

    • Facebook do not allow same status to be posted repeatedly, they think it might be some kind of spam e.g. If you are trying to update status and you have hard coded a string lets say @”This is a test status update” you are posing again and again. After 5 to 10 attempts they wont allow you to do anymore. Resulting com.facebook.sdk error 5. If this is the scenario you should change your status string and try updating.

    • Facebook has defined a limit for a particular user to post status using sdk. e.g If you are trying to update status and you have done lets say 15 to 20 status updates. They wont let you do more Resulting -> com.facebook.sdk error 5. In this scenario try to unauthorize the app from your Facebook account and reauthorize it OR try using other Facebook account

    0 讨论(0)
  • 2020-12-30 07:05

    It seems there might be no answer to the issue. I have checked FB samples coming with SDK, in these examples also the same error happens. So it means after few status updates (15-20) Facebook reaches limits for that particular user. If you log-out for that user and log-in as another user, you can successfully post.

    If I will find any extension to limit settings I will reply. Also Facebook doesn't allow for the same Post.

    0 讨论(0)
提交回复
热议问题