skip to Main Content

I’m using the JavaScript API to log on to FaceBook, and I can call

FB.api('/me?fields=id,name,email,picture,website', function(data) {...});

to get basic details from my profile. What I really want is a URL for my FaceBook profile that I can share with others – they would only be able to see public information from my profile – e.g. the sort of public profile page you get when searching for new friends, https://www.facebook.com/profile.php?id=100002010472154&hc_location=friend_browser&fref=pymk for example. I was hoping the website property would do this but no data is returned in relation to this and it’s unclear whether this has been deprecated.

Is this possible?

So to clarify I just want my public profile page URL, I don’t need access to feeds etc. I’m aware there are some other questions and answers in this space and that Graph API security has been tightened recently, but I don’t think any other questions deal with access just to a user’s public profile page URL.

2

Answers


  1. The “link” field would be what you need, i guess:

    FB.api('/me', {fields: 'id,name,email,picture,link'}, function(data) {...});
    
    Login or Signup to reply.
  2. The link field will give you a URL that automatically redirects to the user’s profile.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search