嘿我正在玩FQL api,因为我有一个Facebook应用程序的想法,似乎表格没有返回记录的对象类型,这里是我喜欢的输出
SELECT object_id, post_id, object_type FROM like WHERE user_id = me()
{
"data": [
{
"object_id": "10151258431583394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 478582878859930,
"post_id": "",
"object_type": "list"
},
{
"object_id": 521644514513038,
"post_id": "",
"object_type": "list"
},
{
"object_id": 106925839472986,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10101021654513450",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10101017009447200",
"post_id": "",
"object_type": "photo"
},
{
"object_id": "10151245338443394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 162988417181213,
"post_id": "",
"object_type": "list"
},
{
"object_id": 439293976134330,
"post_id": "",
"object_type": "list"
},
{
"object_id": 440364829332399,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151229280723394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 489203737786963,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10152125564767619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151113526476775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151113525441775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151113524916775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151113523716775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 123390361144776,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10151199315428394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 278542695598345,
"post_id": "",
"object_type": "list"
},
{
"object_id": 425466477503260,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 531362840223562,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 531362946890218,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 517081921654425,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10151184643108394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 285512984897612,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 284572424991668,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10152126582670161",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151172644678394",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10100959925933020",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 170144483122267,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10152100222280161",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335741896516584,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151216733207457",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10150966158886775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 357351974342058,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10152073370825161",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 337226756372190,
"post_id": "",
"object_type": "list"
},
{
"object_id": "10151044156886775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 122273294554916,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10152061553435161",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151149031423896",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10152074656495188",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335744249849682,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335744153183025,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743509849756,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743463183094,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743403183100,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743376516436,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743259849781,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335743139849793,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742603183180,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742569849850,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742419849865,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742323183208,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742226516551,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742213183219,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742169849890,
"post_id": "",
"object_type": "profile"
},
{
"object_id": 335742033183237,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10101326761860672",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151035255316775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10152047005670511",
"post_id": "",
"object_type": "photo"
},
{
"object_id": "10151194367147619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151111702663394",
"post_id": "",
"object_type": "photo"
},
{
"object_id": 732497948354,
"post_id": "",
"object_type": "photo"
},
{
"object_id": "10152002641675161",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 390781734321391,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151012309836775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151185665687317",
"post_id": "",
"object_type": "photo"
},
{
"object_id": "10152014894905188",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151161548307619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151161549777619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151161552387619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151118986026775",
"post_id": "",
"object_type": "profile"
},
{
"object_id": 191434787659630,
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151003723472163",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10100932691640760",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10100253964691241",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10100253951333011",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151163103492619",
"post_id": "",
"object_type": "profile"
},
{
"object_id": "10151161573682619",
"post_id": "",
"object_type": "profile"
}
]
}
正如您所看到的,大多数对象类型都是配置文件或列表,当查询大多数配置文件对象类型时,我得到“不支持的获取请求”。异常。
如何检索有关这些对象的更多信息?为什么没有照片,专辑,活动,小组,笔记,链接,视频,应用程序,状态,签到,评论,评论,帖子类型?
似乎这没有按预期工作或功能已更改但文档尚未更新。
答案 0 :(得分:1)
几种方式。
您可以发出后续查询以获取有关每个喜欢对象的更多信息。例如:
select src_big from photo where object_id="10151287927181749"
但是,我更喜欢使用Graph API及其“字段扩展”来跟踪连接并在一个查询中获取有关连接对象的数据。例如:
https://graph.facebook.com/me?fields=likes.fields(link,likes,cover)
https://graph.facebook.com/USER_ID?fields=likes.fields(link,likes,cover)
此查询获取当前用户的所有喜欢和返回链接,如count,并为每个喜欢的对象覆盖图片网址。
请参阅Field Expansion文档以构建跟随连接对象的连接和返回字段的查询:
https://developers.facebook.com/docs/reference/api/field_expansion/