(#100) Tried accessing nonexisting field (likes) on node type (ShadowIGMedia)“,”type“:”OAuthExcepti (truncated…)

痞子三分冷 提交于 2020-07-23 07:37:05

问题


I am using Facebook graph API to get specific Instagram post likes, I get user meta data and media and ... but I can't get users who had liked my instagram post. here is my php code:

  $postLikesEndpoint = 'https://graph.facebook.com/v7.0/{object_id}; // object_id = 17859297607958330;


  // endpoint params
  $igParams = array(
     'fields' => 'likes.summary(true)',
     'access_token'=> env('ACCESS_TOKEN')
  );

  $client = new Client();
  $response = $client->request('GET', $postLikesEndpoint, ['query' => $igParams]);
  $body = $response->getBody();

  $responseArray =  json_decode($body,true);
  var_dump($responseArray);

来源:https://stackoverflow.com/questions/62838697/100-tried-accessing-nonexisting-field-likes-on-node-type-shadowigmedia

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!