本文介绍了API共享计数已弃用Facebook Graph?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从今天开始,当我尝试获取共享计数时,答案是: v2.9及更高版本不建议使用共享字段.
Since today when I try to get the share count the answer is :share field is deprecated for versions v2.9 and higher.
例如: https://graph.facebook .com/?id = https://stackoverflow.com& fields = share
如果没有& fields = share ,则显示json内容,但没有共享值.
Without &fields=share the json content is displayed but without the share value.
我需要从URL获取Facebook的共享计数.
I need to get the share count Facebook from an url.
推荐答案
如果您不想使用访问令牌或nginx代理解决方案,请参见 https://stackoverflow.com/a/45796935/2424880 :
If you do not want use access token or nginx proxy solution, see https://stackoverflow.com/a/45796935/2424880:
您可以使用查询
https://graph.facebook.com?id=<your-url>&fields=og_object{engagement}
答案将是
{
"og_object": {
"engagement": {
"count": 197,
"social_sentence": "197 people like this."
},
"id": "895062470590407"
},
"id": "<your-url>"
}
这篇关于API共享计数已弃用Facebook Graph?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!