I just want to put a facebook user profile picture in a simple webpage.
I have read a lot about this, and I found the same answer, "Facebook Api 2.2" cannot query users by username:
http://ift.tt/1f1L3Hn
just by user id, but How Can I do this without the api?, I also read that I have to make the user sign into facebook account in order to get the user id, something like that, but it's just a simple webpage.
I was trying to do this in php.
//this is just for showing the page
$homepage = file_get_contents('http://ift.tt/1SXEiq5');
var_dump($homepage);
Here my idea was to get the page and search for this keyword "fb://profile" in the code and catch the first X characters from that point:
fb://profile/621673493
//I can get this by opening the source code of
http://ift.tt/1SXEiq5
but the big issue is that file_get_contents goes to the index page "www.facebook.com" not to "http://ift.tt/IzxhWg", with any other page works fine but not with facebook.
Aucun commentaire:
Enregistrer un commentaire