Is it possible to get somebody's Facebook name by ID?
It's possible to get it by file_get_contents but it's disabled on my server I'm afraid. I believe there's a curl work around but I've not used much curl before so I'm not quite sure what to use.
$pageContent = file_get_contents('http://graph.facebook.com/1157451330');
$parsedJson = json_decode($pageContent);
You can use cURL, like so:
$url = 'http://graph.facebook.com/4?fields=name'; $ch = curl_init(); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,CURLOPT_URL,$url); $result = curl_exec($ch); curl_close($ch); $result = json_decode($result); echo $result->name;