I want to get the realtime facebook sharecounts for each url in my site so I can display it.
I found two ways:
- using the facebook restserver.php like this:
And it returns this:
<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>
- Using the garph api, like this:
https://graph.facebook.com/v2.5/https://www.daltravel.ro/circuit/Circuit-Anglia-Scotia-Irlanda?access_token=ACCESS_TOKEN
And it returns like this:
{
"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"
}
Both methods show 0 counts, although I shared it several times. Using the second method I also get the "updated_time": "2016-01-10T12:20:56+0000" value.
How can I get the latest information ?
Thank you !