[英]Facebook iOS SDK v3.1: How can I logout the previous user in my app when a different user logs in at Facebook?
If the user logs out from the Facebook app, my app won't be affected. 如果用户从Facebook应用程序注销,我的应用程序将不会受到影响。 Then if he logs in with a different account through Facebook app, my app can't detect it.
然后,如果他通过Facebook应用程序使用其他帐户登录,我的应用程序将无法检测到它。
How can I detect if a different user/account is using my app? 如何检测其他用户/帐户是否正在使用我的应用程序?
You can get the facebook user's id (and more) using the graph api: 您可以使用图形API获取Facebook用户的ID(以及更多信息):
[[FBRequest requestForMe] startWithCompletionHandler:^(FBRequestConnection *connection,NSDictionary<FBGraphUser> *user, NSError *error) {
if (!error) {
NSLog(@"%@",user.id);
}
}];
You can use that to detect which user is using your app. 您可以使用它来检测哪个用户正在使用您的应用程序。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.