我使用FQL获取有关用户帖子的信息。例如:
Select likes from stream where post_id='100000481752xxx_828718160487568'
接下来回复我:
{
"data": [
{
"likes": {
"href": "https://www.facebook.com/browse/likes/?id=828718160487568",
"count": 2,
"sample": [
100000640266xxx,
100000481752xxx
],
"friends": [
],
"user_likes": false,
"can_like": false
}
}
]
}
如何从“喜欢”中仅选择字段“count”和“sample”?
答案 0 :(得分:1)
使用field.subfield
以便:
SELECT likes.count, likes.sample
FROM stream
WHERE post_id='100000481752xxx_828718160487568'
结果:
{
"data": [
{
"likes": {
"count": 2,
"sample": [
100000640266xxx,
100000481752xxx
]
}
}
]
}