我想获取我网站中每个网址的实时facebook分享数量,以便我可以显示它。
我找到了两种方法:
并返回此信息:
<links_getStats_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true">
<link_stat>
<url>
https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda
</url>
<normalized_url>
https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda
</normalized_url>
<share_count>0</share_count>
<like_count>0</like_count>
<comment_count>0</comment_count>
<total_count>0</total_count>
<click_count>0</click_count>
<comments_fbid>1084234134929324</comments_fbid>
<commentsbox_count>0</commentsbox_count>
</link_stat>
</links_getStats_response>
https://graph.facebook.com/v2.5/https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda?access_token= ACCESS_TOKEN
它会像这样返回:
{
"og_object": {
"id": "1084234134929324",
"description": "Marea Britanie si Irlanda. Marea Britanie spune povestea a trei tari: Anglia, Scotia si Tara Galilor, in care castelele, catedralele pub-uri sunt cu adevarat fermecatoare. In Irlanda va bucurati de peisaje naturale uluitoare, dar si de legende stravechi.",
"title": "Dal Travel - agentia devoratorilor de turism",
"type": "website",
"updated_time": "2016-01-10T12:20:56+0000",
"url": "https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda"
},
"share": {
"comment_count": 0,
"share_count": 0
},
"id": "https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda"
}
虽然我多次分享,但这两种方法都显示了0个计数。使用第二种方法我也得到“updated_time”:“2016-01-10T12:20:56 + 0000”值。
如何获取最新信息?
谢谢!