How to get Likes Count when searching Facebook Graph API with search=xxx

Couldn’t find this in the documentation but multiple calls to the API are not necessary. You can use summary when querying a feed or multiple posts. Specify this in the fields parameter. https://graph.facebook.com/PAGE_ID/feed?fields=comments.limit(1).summary(true),likes.limit(1).summary(true) This will return a response like this. { “data”: [ { …. “summary”: { “total_count”: 56 } … }, { …. “summary”: … Read more

Posting an embedded video link using the Facebook Graph API

It appears that you have to extract the URLs of the actual swf in the page and the thumbnail image yourself. For example, this seems to work: curl -F ‘access_token=…’ \ -F ‘message=Link to YouTube’ \ -F ‘link=http://www.youtube.com/watch?v=3aICB2mUu2k’ \ -F ‘source=http://www.youtube.com/v/3aICB2mUu2k’ \ -F ‘picture=http://img.youtube.com/vi/3aICB2mUu2k/0.jpg’ \ https://graph.facebook.com/me/feed It appears that you can generate a valid source … Read more

Why does Facebook Graph API say my account is non-active?

Please read this article: Mark Zuckerberg apologises for Facebook’s ‘mistakes’ over Cambridge Analytica Cambridge University researcher named Aleksandr Kogan had used an app to extract the information of more than 50 million people, and then transferred it to Cambridge Analytica for commercial and political use. So facebook is changing its policies so that the personal … Read more

Facebook api: (#4) Application request limit reached

The Facebook API limit isn’t really documented, but apparently it’s something like: 600 calls per 600 seconds, per token & per IP. As the site is restricted, quoting the relevant part: After some testing and discussion with the Facebook platform team, there is no official limit I’m aware of or can find in the documentation. … Read more

Facebook Graph API – upload photo using JavaScript

Yes, this is possible, i find 2 solutions how to do that and they are very similar to each other, u need just define url parameter to external image url FIRST one using Javascript SDk: var imgURL=”http://farm4.staticflickr.com/3332/3451193407_b7f047f4b4_o.jpg”;//change with your external photo url FB.api(‘/album_id/photos’, ‘post’, { message:’photo description’, url:imgURL }, function(response){ if (!response || response.error) { … Read more

Combining the meta description and Open Graph Protocol description into one tag

Yes, you can combine them. To test it, I made the simple HTML page below, uploaded it to a server, then ran the page through Facebook’s URL Linter. It reported no warnings related to the description tag (only about the missing og:image tag) and correctly read the description. <!doctype html> <html> <head> <meta name=”description” property=”og:description” … Read more

How to get share counts using graph API

Here’s a list of API links to get your stats: Facebook: https://api.facebook.com/method/links.getStats?urls=%%URL%%&format=json Reddit:http://buttons.reddit.com/button_info.json?url=%%URL%% LinkedIn: http://www.linkedin.com/countserv/count/share?url=%%URL%%&format=json Digg: http://widgets.digg.com/buttons/count?url=%%URL%% Delicious: http://feeds.delicious.com/v2/json/urlinfo/data?url=%%URL%% StumbleUpon: http://www.stumbleupon.com/services/1.01/badge.getinfo?url=%%URL%% Pinterest: http://widgets.pinterest.com/v1/urls/count.json?source=6&url=%%URL%% Edit: Removed the Twitter endpoint, since that one has been deprecated. Edit: Facebook REST API is deprecated