Get Facebook User ID with Facebook App Scope ID

不羁的心 提交于 2019-12-01 11:56:07

You will not be able to get the global user id. But there are other methods to be able to know. And it is all described at https://developers.facebook.com/docs/apps/for-business

It is possible to get the Facebook global user id. See this article. You get the link to someone's profile page using their app-scoped id, and from their profile page you can find their global id. Here's a site that will do the second part for you.

But I'm not sure what good the global user id will do for you, because in order to make API calls in your different apps you still need to use the app-scoped id. The docs linked to by WizKid and the article I linked above describe how to handle the same user across different apps.

In your situation I would recommend the following (this might not be the best solution, but at least it will get you working)

When you make a call to get the facebook user, Link(a link to the person's Timeline) is also returned.

In your case, App1 is associated to Link https://www.facebook.com/app_scoped_user_id/AppScopedUserIdForApp1/ App2 is associated to Link https://www.facebook.com/app_scoped_user_id/AppScopedUserIdForApp2/

The important thing to notice is both Links will be redirected to same URL. https://www.facebook.com/FacebookUserName which implies that App1's Link = App2's Link. You can implement this Logic so that multiple facebook apps can use the same database.

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