E
E
EvGenius Karlonius2017-02-08 22:57:43
PHP
EvGenius Karlonius, 2017-02-08 22:57:43

How to get full public_profile from FaceBook, not just [name] and [id]?

According to the description, any question from the web to the api will give information on the entire public_profile , but I only have [name], [id]
$query = " https://graph.facebook.com/me?access_token= ".$token;
$cu = curl_init();
curl_setopt($cu, CURLOPT_URL, $query);
curl_setopt($cu, CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($cu);
curl_close($cu);
$j = json_decode($result);
if(!$result) { exit(curl_error($cu)); }
if(isset($j -> error)) { exit($j->error->message); }
print_r($j);
stdClass Object ( [name] => Eugene [id] => 1111222233334444 )

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Trakhimenok, 2017-02-09
@BloodKarl

Add the fields parameter .
Like this:
--
Alex

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question