我计划为移动用户使用Built-in Like,并为网络用户使用标准的Like按钮来“喜欢”网页。
但内置类似功能是否与Like按钮(社交插件)有连接?
从我的观察:
在网络版上,点击标准的Like按钮后,Open Graph Object可以立即跟踪
致电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
}
]
}
但是使用Built-in Like,Open Graph对象根本无法跟踪'like',like_count和total_count都是0。
然后这是有趣的部分:
使用og.likes
https://graph.facebook.com/userid/og.likes?access_token=myAccessToken
它返回两个喜欢,1来自Like按钮,1来自Built-in 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
}
}
]
}
然后使用id
返回的操作og.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
。
感谢您的时间。
答案 0 :(得分:0)
添加og:url
并使用Open Graph Object 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
有关