instagram API : 从评论 id 中查找用户 id

instagram API :find user id from comment id

我从我的图片中找到了评论 ID

$comment= $instagram->getMediaComments($id_photo);

在 $comment 中我有:

 array (size=3)
      0 => 
        object(stdClass)[317]
          public 'created_time' => string '1428490039' (length=10)
          public 'text' => string 'Keye?😋kojast?' (length=16)
          public 'from' => 
            object(stdClass)[318]
              ...
          public 'id' => string '958566383632997763' (length=18)

我有评论ID,但我想找到用户ID!

 $comment= $instagram->getMediaComments($id_photo)->data;

这是来自用户的 return ID。

数组的元素from应该包含你要搜索的用户id,所以你应该可以这样得到它:

$comment[0]->from->id