How to avoid the “Duplicate status message” error in using Facebook SDK in iOS?

南笙酒味 提交于 2019-11-28 14:01:33

You can't.

That is Facebook's way to tell you to stop spamming.

Sorry if it sounds slightly mean - but posting the same message over and over and over again is spamming, and its not good. The error message you are getting describes the problem - you are posting the same status message. It is a special error message created specifically for this case.

I check for the 506 code and don't show any error to the user in case it's a duplicate status error

if (error && [[[[[error.userInfo objectForKey:@"com.facebook.sdk:ParsedJSONResponseKey"] objectForKey:@"body"]objectForKey:@"error"]objectForKey:@"code"] intValue] !=506) {

 alertTitle = NSLocalizedString( @"SomethingWentWrongTitle", nil);

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