Search code examples
imagefacebookprofile

Get a facebook numeric id and profile picture w/o facebook api or facebook sdk


I have a question. Is there a possible way to get someone's profile numeric id and profile picture, WITHOUT using an Acces token, facebook SDK or API. Just with scripts?

I have this code:

function GetProfilePicture() 
{
var userId=prompt('userID please','id here')
var imglink="<img src='https://graph.facebook.com/" + userId + "/picture? type=large'>"

document.getElementById('profilepicture').innerHTML=imglink;
}

This code used to paste the profile picture of the user in the HTML element named "profile picture", but due to changed in facebook, this doesn't work anymore. Instead of the user id (eg.: JohnDoe), you need the numeric id to Make this code work. Is there Any script i can include in my code so it displays the profile picture after giving the FaceBook id?

Before people start thinking wrong about me: I am ONLY using this numeric id thing to retrieve name & profile picture. I am not mailing/spoofing/hijacking something! The only thing i want to get out of the url is the numeric ID, and a way to get the profile name and the profile picture. I am only using this for LEGAL PURPOSES.

Thanks in advance!


Solution

  • There seems to be no way to retrieve this information without violating the terms of service of facebook. If i may find a way later (when the ToS changes for example). I'll post it here.