多个应用程序之间共享的Facebook用户ID [英] Share Facebook User ID between more than one application
问题描述
我有三个应用程序,每一位使用一个Facebook应用程序。
我得到Facebook的用户信息符合API如下:
I have three application, every one use a Facebook application. I get the Facebook userInfo with Api as follows:
[[[FBRequest alloc] initWithSession:appDelegate.fbSession graphPath:@"me"] startWithCompletionHandler:
^(FBRequestConnection *connection,
NSDictionary<FBGraphUser> *fbuser,
NSError *error) {
if (!error) {
NSLog(@"userid:%@",fbuser.id);
}
}];
如果我使用不同的Facebook应用程序,fbuser.id是不同的。
我如何才能让这三个应用程序使用相同的fbuser.id?
If I use different Facebook application, fbuser.id is different. How could I make three application use the same fbuser.id?
感谢。
推荐答案
通过引进图形API 2.0版的,user_ids是应用范围的,这意味着相同的用户将有不同的应用程序不同user_ids。
With the introduction of Graph API v2.0, user_ids are app-scoped, meaning that the same user will have different user_ids with different apps.
请参阅 https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
有是通过业务映射的API映射user_ids的可能性:
There's the possibility to map the user_ids via the Business Mapping API:
https://developers.facebook.com/docs/apps/for-business
商务API映射只对谁经营多个面向用户的应用程序和谁需要在它们之间的相同的应用程序范围的用户ID映射,对于交叉推广,例如企业有用的。
The Business Mapping API is only useful for businesses who operate multiple user-facing apps and whom need to map the same app-scoped user IDs across them, for cross-promotion for example.
这篇关于多个应用程序之间共享的Facebook用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!