重复调用ACAccountStoreDidChangeNotification

时间:2013-11-19 07:47:36

标签: ios iphone facebook-graph-api

我在我的ios应用程序中使用facebook发布得分。在登录facebook时我会检查我的iPhone设置中是否配置了facebook帐号,如果没有配置我发消息为“在iphone设置中配置你的facebook登录” 。 因此,当用户配置它时,我会通过“ ACAccountStoreDidChangeNotification ”收到我的应用通知。 我的问题是,即使用户仅更改了一次帐户,也会多次调用此通知

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sharingStatus) name:ACAccountStoreDidChangeNotification object:nil];

这是我注册通知的方式

- (void)sharingStatus {
i give message as account being configured.

}

任何人都可以帮助我,为什么通知ACAccountStoreDidChangeNotification被多次调用。我按照这个链接Handle ACAccountStoreDidChangeNotification for Facebook & Twitter in iOS 6+但对我没那么有用。 谢谢

0 个答案:

没有答案