我计划为移动用户使用内置的Like,并为web用户使用标准的Button来“喜欢”网页。
但是,内置的Like功能是否与Like Button (社交插件)有关联?
根据我的观察:
在web版本中,在我点击了像Button这样的标准之后,Open Graph对象就可以像这样立即跟踪
调用fql?q=SELECT share_count, like_count, comment_count, total_count, click_count FROM link_stat WHERE url="http://websitelinkhere.com";
返回
{
"data": [
{
"share_count": 0,
"like_count": 1,
"comment_count": 0,
"total_count": 1,
"click_count": 0
}
]
}但是使用内置的Like,Open Graph对象根本无法跟踪那个“like”,like_count和total_count都是0。
接下来是有趣的部分:
通过使用https://graph.facebook.com/userid/og.likes?access_token=myAccessToken检查我的og.likes
它返回两个Like,一个来自Like按钮,另一个来自内置的Like Action
{
"data": [
{
"id": "10151050736776633",
"from": {
//skipped
},
"start_time": "2012-08-24T07:10:52+0000",
"end_time": "2012-08-24T07:10:52+0000",
"publish_time": "2012-08-24T07:10:52+0000",
"application": {
//skipped
},
"data": {
//skipped
},
"type": "og.likes",
"no_feed_story": false,
"likes": {
"count": 0,
"can_like": true,
"user_likes": false
},
"comments": {
"count": 0,
"can_comment": true
}
},
{
"id": "10151050736586633",
"from": {
//skipped
},
"start_time": "2012-08-24T07:10:42+0000",
"publish_time": "2012-08-24T07:10:42+0000",
"application": {
//skipped
},
"data": {
//skipped
},
"type": "og.likes",
"no_feed_story": false,
"likes": {
"count": 0,
"can_like": true,
"user_likes": false
},
"comments": {
"count": 0,
"can_comment": true
}
}
]
}然后通过使用og.likes返回的操作id,我可以使用以下命令删除这两个likes
curl -X DELETE \
-F 'access_token=accessToken' \
https://graph.facebook.com/10151050736776633和
curl -X DELETE \
-F 'access_token=accessToken' \
https://graph.facebook.com/10151050736586633是不是因为我还没有把申请提交给Facebook审核?
我希望内置的Like和Like按钮作为一个动作一起工作,而不是单独生成og.likes。
谢谢您抽时间见我。
发布于 2012-08-24 21:00:46
添加og:url并使用Open Graph对象ID可以直接修复该问题。
curl -X POST \
-F 'access_token=accessTokenHere' \
-F 'object=UsingOpenGraphObjectIDHereDirectly' \
https://graph.facebook.com/useridhere/og.likes可能与Impossibile to publish built-in Like action on Open Graph Pages with Likes有关
https://stackoverflow.com/questions/12104841
复制相似问题