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);
}
}];
If I use different Facebook application, fbuser.id is different. How could I make three application use the same fbuser.id?
Thanks.
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.
See https://developers.facebook.com/docs/apps/upgrading#upgrading_v2_0_user_ids
There's the possibility to map the user_ids via the Business Mapping API:
https://developers.facebook.com/docs/apps/for-business
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.