如何获取有关在我的脸书上发表评论的用户的图片? [英] How to get picture of user who has commented on my facebook post?
问题描述
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屋!