我建议你为每篇文章创建一个facebook object
,并保留object id
,这样你就可以“附上”评论,使得阅读每篇文章的评论变得非常简单。
代码明智的,这将是流动:
当您创建了一篇文章,POST
in your PAGE FEED为:
FB.api(
"/{page-id}",,
"POST",
{
"about": "Test about text",
"hours": "{'mon_1_open': '12:00'}",
"cover": "1234567890",
"offset_y": "45"
},
function (response) {
if (response && !response.error) {
/* response.id will have your post-id */
}
}
);
那么简单add comments到POST ID
像
FB.api(
"/{post-id}/comments",
"POST",
{
"message": "This is a test comment"
},
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
显示all current comments ,只需拨打电话
FB.api(
"/{post-id}/comments",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
你甚至可以有一个新的表,你可以有internal_user_id
/comment_id
带给所有用户的意见为Web应用程序...