user4090029
user4090029

Reputation:

OAuth - How to get Facebook user profile url?

I don't know why I've got the different between the id from Facebook url and ProviderKey in the controller.

Here is my profile url: https://www.facebook.com/profile.php?id=100008491477935. So, my id is 100008491477935

But, when I use that account to login, the ProviderKey is not the same:

var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();

loginInfo.Login.LoginProvider is 1488586148101087

I can get the picture from this url: https://graph.facebook.com/1488586148101087/picture

But, I've got error message Profile Unavailable when trying to go to https://www.facebook.com/profile.php?id=1488586148101087

The id is not correct (different from ProviderKey).

I wanna get user profile url by using ProviderKey like the id. Is there a way to do that?

Thank you!

Upvotes: 0

Views: 2438

Answers (1)

Salman Aslam
Salman Aslam

Reputation: 447

With the upgrade from Facebook Graph API v1.0 to v2.0, Facebook is using "App-scoped User IDs", so you cannot see the "original" user ID inside your apps anymore.

Refer to this Post(Question) for detailed answer.

Get Facebook User ID from app-scoped User ID

Good Luck

Upvotes: 1

Related Questions