Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get facebook likes, shares, and comment count for a post url without using fql?

I need facebook like, share and comment count by passing the post url ("www.example.com/exampleblog") without using fql(as fql is not supported in v2.1).

i dont want the below one

 https://graph.facebook.com/fql?q=SELECT url, 
share_count, like_count, comment_count, 
total_count,commentsbox_count, comments_fbid, 
click_count FROM link_stat WHERE url='http://example.example.com/'

can anyone suggest an alternative to the above , that supports api v2.1?

like image 404
sudil ravindran pk Avatar asked Aug 12 '14 09:08

sudil ravindran pk


People also ask

Is there a Facebook API?

What is the Facebook API? The Facebook Graph API is an HTTP-based API that allows developers to extract data and functionality from the Facebook platform. Applications can use this API to programmatically query data, post in pages and groups, and manage ads, among other tasks.

What type of API does Facebook use?

The Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

Which endpoint is suitable to get the number of likes on an article comment?

We recommended that you use the /object/reactions endpoint to get like counts, if available.


1 Answers

In Graph v2.1, Facebook added the URL node to query details about any given URL. It'll give you plenty of details, including share/comment counts.

like image 96
Chris Houghton Avatar answered Sep 29 '22 16:09

Chris Houghton