通过Graph API对Facebook页面评分(评论)进行评论 [英] Commenting on Facebook Page Ratings (Reviews) via Graph API

查看:110
本文介绍了通过Graph API对Facebook页面评分(评论)进行评论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

长时间潜伏第一次海报...

Long time lurker first time poster...

我们正在与Facebooks API集成到我们的Web应用程序中,并且能够通过{page-id}/ratings部分中的{open_graph_story}参数提取公司页面评分,但是我们找不到评论的方法/回复评分.该文档指出:

We are working with Facebooks API's to integrate into our web application and we are able to pull a Companies Page Rating via the {open_graph_story} parameter in the {page-id}/ratings section, however we cannot find a way to comment/reply to the rating. The documentation states:

如果某人对您的页面进行了评分,并生成了一个故事,则可以通过发布到故事的评论节点来跟进该人." ( https://developers.facebook.com/docs/graph-api/reference/v2.0/page/ratings )

"If a person has rated your page and a story has been generated, you can follow up with the person by posting to the story's comment node." (https://developers.facebook.com/docs/graph-api/reference/v2.0/page/ratings)

但是,当我们拉出变量时,我们不会检索任何ID来引用注释.这是我们从经过身份验证的帐户获得的回馈:

however when we pull the variables we retrieve no ID to reference for a comment. This is what we receive back from our authenticated account:

数据":[
{"created_time":"2014-07-16T05:52:50 + 0000",
"reviewer":{
"id":"100000237096397",
"name":罗马萨拉查(Salazar)"
},
"等级:5,
" review_text:"干得好!!!!"
}],

"data": [
{ "created_time": "2014-07-16T05:52:50+0000",
"reviewer": {
"id": "100000237096397",
"name": "Romey Salazar"
},
"rating": 5,
"review_text": "Great job guys!!!!"
} ],

有人知道如何检索评级本身的ID,以便我们可以通过API附加评论吗?还是通过其他方式回复/评论FB页面评分?

Does anyone know how to retrieve the id for the rating itself so we can append a comment via API? Or some other way to reply/comment to a FB Page Rating?

谢谢!

推荐答案

在页面上有一些评分/评论注释时,如果您想以页面所有者的身份对单个评论注释发表评论,则可以执行以下步骤

When you have some ratings/review comments on your page and if you want to post comment to individual review comments as the Page Owner, you can follow the steps below.

1)下面的请求返回等级和评论的json对象.

1) Below request returns the json object of rating and reviews.

https://graph.facebook.com/v2.9/{YOUR_PAGE_ID}/ratings?field=open_graph_story&access_token={YOUR_PAGE_ACCESS_TOKEN}

响应json将包含每个评分/评论的ID字段.

The response json will contain ID field for each and every rating/review comments.

2)使用ID触发以下请求,以页面所有者的身份对等级发表评论.您将需要具有manage_pages和publish_pages特权的Page访问令牌.

2) Using the ID, trigger the below request to post a comment on the rating as the Page Owner. You will need Page access token with manage_pages and publish_pages privilege.

https://graph.facebook.com/v2.9/{ID_OF_THE_RATING}/comments?message=Thanks for your rating&access_token={YOUR_PAGE_ACCESS_TOKEN}

可以使用Facebook Graph API Explorer测试这些请求

These requests can be tested using Facebook Graph API Explorer

这篇关于通过Graph API对Facebook页面评分(评论)进行评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆