Domanda

I have my website which has different article pages almost 1000. I want to get facebook share count for all article pages. I am trying to use url with comma separated urls for article pages

http://graph.facebook.com/?ids=art1url,art2url

But it does not give me the complete JSON i always get different results for urls like if i made hit with 30 urls sometimes it give hit for 20 urls and sometimes for 25 urls but not consistent Could you please help me in this.

È stato utile?

Soluzione

You can use the link_stat FQL table (see docs here: https://developers.facebook.com/docs/reference/fql/link_stat/) as follows:

select url, click_count, comment_count, like_count, share_count, total_count from link_stat where url in ('{url1}', '{url2}', ...)

I'd recommend that you use not too big batches of URLs, because the overall length of an FQL statement is not allowed to exceed 2048 characters.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top