Answer the question
In order to leave comments, you need to log in
FaceBook me/picture?type=large. How to return JSON?
https://developers.facebook.com/tools/explorer/?me...
Here is, in fact, GAE. A JSON file is returned there, but if you execute a request in the address bar, it will redirect to the image.
The difficulty is this
$photo=file_get_contents('https://graph.facebook.com/me/picture?access_token='.$token.'&type=large');
Answer the question
In order to leave comments, you need to log in
To return JSON, you need to pass the redirect parameter set to false .
$request = new FacebookRequest(
$session,
'GET',
'/me/picture',
array(
'type' => 'large',
'redirect' => 'false'
)
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
/* handle the result */
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question