I am trying to fetch the photos of a user from facebook using php api. Currently I don't have permissions to fetch the photos from facebook. But I am using the same id which has been used to create the facebook app. I heard that we can use the same id (the one used to create the app) for testing everything from facebook. My code for fetching user photos is :-
$request = new FacebookRequest(
$session,
'GET',
'/{user-id}/photos'
);
$response = $request->execute();
$graphObject = $response->getGraphObject();
Response of the above code :- Array()
It is returning a blank array. Is it because I do not have permissions to fetch photos or any other reason?
As an app admin/developer/tester you can experiment with permissions without the need of submitting for app review. However , you still need to request the permission to be able to access the data of these endpoints.
You can easily test this on the Graph API Explorer , where you could easily request permissions and query endpoints.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.