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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -