Kjensen
Kjensen

Reputation: 12384

Connecting with facebook to get user profile link (2020)

In a website, is it possible to ask the user to "connect to facebook" and grant the website access to the profile link - or some other piece of data that can turn into the profile link?

If yes, what API/method should I look at?

By profile link I mean http://facebook.com/{myprofile} which links to the person's facebook page.

I see a LOT of posts about this, but they are old and outdated and what you can and cannot do with facebook has changed a lot in the last couple of years.

Upvotes: 1

Views: 390

Answers (1)

andyrandy
andyrandy

Reputation: 74004

There is no way to get the "real" profile link (including the username) anymore. You can get a link with the API, but it may not be what you want:

https://developers.facebook.com/docs/graph-api/reference/user/

/me?fields=link

A link to the person's Timeline. The link will only resolve if the person clicking the link is logged into Facebook and is a friend of the person whose profile is being viewed.

Edit: Oh, i have answered that question before: Get "real" profile URL from Facebook Graph API /user

Upvotes: 1

Related Questions