inc*_*ent 5 facebook facebook-graph-api facebook-javascript-sdk
我正在尝试从Facebook API获得有关评分的评论。
首先,我请求我拥有的页面的评分列表:
https://graph.facebook.com/v3.0/me/ratings?fields=open_graph_story?access_token=[access_token]
Run Code Online (Sandbox Code Playgroud)
响应:
{
"data": [
{
"open_graph_story": {
"message": "The best place in the world(s), and this is to reach that limit in the facebook review.",
"start_time": "2018-05-24T22:56:23+0000",
"type": "pages.rates",
"data": {
"rating": {
"value": 5,
"scale": 5
},
"review_text": "The best place in the world(s), and this is to reach that limit in the facebook review.",
"is_hidden": false,
"language": "en"
},
"id": "1805660589743235"
}
},
{
"open_graph_story": {
"message": "Very good, not excellent though. Does Facebook change the created time if I edit this?",
"start_time": "2018-04-12T20:25:26+0000",
"type": "pages.rates",
"data": {
"rating": {
"value": 3,
"scale": 5
},
"review_text": "Very good, not excellent though. Does Facebook change the created time if I edit this?",
"is_hidden": false,
"language": "en"
},
"id": "106674383523012"
}
}
],
"paging": {
"cursors": {
"before": "MTAwMDA4OTc5MzQ4Mjc3Ojc3MzQwNTI3NjIwMTQyNAZDZD",
"after": "MTAwMDI1NDEzNTE3NzgxOjc3MzQwNTI3NjIwMTQyNAZDZD"
}
}
}
Run Code Online (Sandbox Code Playgroud)
(我删除了一些多余的字段)
然后,我使用open_graph_story中的id来获取评论的等级:
https://graph.facebook.com/v3.0/106674383523012/comments?access_token=[access_token]
Run Code Online (Sandbox Code Playgroud)
响应:
{
"data": [
],
"paging": {
"cursors": {
"before": "WTI5dGJXVnVkRjlqZAFhKemIzSTZANVFF5T1RNeU1UUTVPRGszTWpNMU9qRTFNalkwT0RZAeE1qZAz0ZD",
"after": "WTI5dGJXVnVkRjlqZAFhKemIzSTZANVFE0TlRBM09URXlOamN5T1RreU9qRTFNamN5TURJek56ST0ZD"
}
}
}
Run Code Online (Sandbox Code Playgroud)
即使我访问Facebook页面时可以看到有关实际评分的评论,也不会返回任何数据。为什么没有评论返回?
(仅为了确保我具有正确的权限,我在图形API资源管理器中选择了所有可能的权限。)
| 归档时间: |
|
| 查看次数: |
350 次 |
| 最近记录: |