如何获取有关在我的脸书上发表评论的用户的图片? [英] How to get picture of user who has commented on my facebook post?

查看:280
本文介绍了如何获取有关在我的脸书上发表评论的用户的图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我拥有iOS应用程序分享的状态的post_id,现在用图形API,我正在收到评论信息,如info:

  POST_ID?fields = likes.fields(pic_square,name),评论

我可以获取大部分的细节,但是没有发表评论的用户的个人资料图片。检查我得到的细节: -

  {
id:POST_ID,
updated_time:2014-03-25T07:07:14 + 0000,
喜欢:{
data:[
{
pic_square https://fbcdn-profile-a.akamaihd.net/static- ak / rsrc.php / v2 / yo / r / UlIqmHJn-SK.gif,
name:用户名,
id:100007640XXXXX
}
],
分页:{
游标:{
之后:MTAwMDA3NjQwMzcxMzQxxx
before:MTAwMDA3NjQwMzcxMzQxxx
}
}
},
comments:{
data:[
{
id:2069772628xxxxxx,
from:{
name:user name,
id:100007640xxxxxx
} ,
message:great reader ..,
can_remove:true,
created_time:2014-03-26T06:19:36 + 0000,
like_count:0,
user_likes :false
}
],
分页:{
游标:{
之后:MQ ==,
之前的:MQ ==
}
}
}
}

现在我需要一个用户发表评论的用户的图片,我正在看到喜欢的用户的图片,但是没有谁评论。我试图用FQL得到它,但不成功。

解决方案

使用此API:



https://graph.facebook.com/100007640xxxxxx/picture



100007640xxxxxx:是userid。



编辑:



如果要加载特定大小的用户图片,则可以使用以下内容:



https://graph.facebook.com/100007640xxxxxx/picture?width=150&height=150


I have post_id of the status which user share by iOS app, Now with graph api, I'm getting comment info and like info:

POST_ID?fields=likes.fields(pic_square,name),comments

With above, I'm able to fetch most of the details, but not profile pic of user who commented on post. check details which I'm getting:-

{
  "id": "POST_ID", 
  "updated_time": "2014-03-25T07:07:14+0000", 
  "likes": {
    "data": [
      {
        "pic_square": "https://fbcdn-profile-a.akamaihd.net/static- ak/rsrc.php/v2/yo/r/UlIqmHJn-SK.gif", 
        "name": "User name", 
        "id": "100007640XXXXX"
      }
    ], 
    "paging": {
      "cursors": {
        "after": "MTAwMDA3NjQwMzcxMzQxxx", 
        "before": "MTAwMDA3NjQwMzcxMzQxxx"
      }
    }
  }, 
  "comments": {
    "data": [
      {
        "id": "2069772628xxxxxx", 
        "from": {
                 "name": "user name", 
                 "id": "100007640xxxxxx"
                }, 
        "message": "great reader..", 
        "can_remove": true, 
        "created_time": "2014-03-26T06:19:36+0000", 
        "like_count": 0, 
        "user_likes": false
      }
    ], 
    "paging": {
          "cursors": {
          "after": "MQ==", 
         "before": "MQ=="
      }
    }
  }
}

Now I need picture of a user who commented on post, I'm getting picture of user who likes, but not who commented. I tried to get it with FQL but not succeed.

解决方案

Use this API:

https://graph.facebook.com/100007640xxxxxx/picture

100007640xxxxxx: is userid.

Edit:

if you want to load user picture in particular size then you can use following:

https://graph.facebook.com/100007640xxxxxx/picture?width=150&height=150

这篇关于如何获取有关在我的脸书上发表评论的用户的图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆