我正在尝试从类型网站的开放图形对象中获取注释.
我正在官方的Graph API Explorer页面上测试所有这些,https://developers.facebook.com/tools/explorer
首先,我将页面中的URL粘贴到其页面上.我得到这样的东西:
{
"og_object": {
"id": "id_of_the_object",
"description": "some_description",
"title": "some_title",
"type": "website",
"updated_time": "2017-03-30T08:35:44+0000"
},
"share": {
"comment_count": 5,
"share_count": 31
},
"id": "the_pasted_link"
}
Run Code Online (Sandbox Code Playgroud)
如您所见,它表示对于此OGObject有5条注释.
通过在Explorer页面上请求以下内容,我使用id_of_the_object来收集评论:
id_of_the_object/comments
我得到一个空数据对象,没有注释:
{
"data": [
]
}
Run Code Online (Sandbox Code Playgroud)
但是当我对类型文章的OGObject发出相同的请求时,注释就在那里:
{
"data": [
{
"created_time": "2017-03-30T12:21:48+0000",
"from": {
"name": "user",
"id": "user_id"
},
"message": "some_message",
"id": "message_id"
}
],
"paging": {
"cursors": {
"before": "blabla",
"after": "blabla"
}
}
}
Run Code Online (Sandbox Code Playgroud)
所以主要的问题是,我可以从类型网站的OGObject获得评论吗?因为它显然不像类型文章那样工作.