dongnachuang6635 2015-11-25 05:32
浏览 74
已采纳

无法使用facebook api获取照片

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?

  • 写回答

1条回答 默认 最新

  • douyun3022 2015-12-08 10:49
    关注

    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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 目标检测项目无法读取视频
  • ¥15 GEO datasets中基因芯片数据仅仅提供了normalized signal如何进行差异分析
  • ¥15 小红薯封设备能解决的来
  • ¥100 求采集电商背景音乐的方法
  • ¥15 数学建模竞赛求指导帮助
  • ¥15 STM32控制MAX7219问题求解答
  • ¥20 在本地部署CHATRWKV时遇到了AttributeError: 'str' object has no attribute 'requires_grad'
  • ¥15 vue+element项目中多tag时,切换Tab时iframe套第三方html页面需要实现不刷新
  • ¥50 深度强化学习解决能源调度问题
  • ¥15 一道计算机组成原理问题