php - Get FB Full Name by ID -
is possible somebody's facebook name id?
it's possible file_get_contents it's disabled on server i'm afraid. believe there's curl work around i've not used curl before i'm not quite sure use.
$pagecontent = file_get_contents('http://graph.facebook.com/1157451330'); $parsedjson = json_decode($pagecontent); echo $parsedjson->name;
any appreciated.
you can use curl, 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;
output:
mark zuckerberg
Comments
Post a Comment