I was looking to find an answer to my question, but so far I got this:
https://graph.facebook.com/the_user_id?fields=name,picture
I need to be able to display/print first,last name and picture of a set list of users for which I know their ID. What code is required to get this data and then to publish it on a php/html page? Of course, this will means that if I want to show 10 users, I will input 10 different IDs (read smtg about an array list?). Notice that I DO NOT require for this to work for the current user.
Thanks in advance for your replies.
You need to use file_get_contents ( https://www.php.net/file_get_contents ) or curl in php and issue a request to the url such as follows:
(replacing id1,id2 with your ids)
this will then return you a json object. You then need to decode ( https://www.php.net/json_decode ) and loop through this and access the information
this should get you started
I’ve batched the requests here, alternatively you could perform 10 separate queries for each user, but that would be a bit pointless and inefficient