Getting all likes on my domain (facebook)

2019-06-24 08:03发布

问题:

I'm trying to get statistics for likes on my domain. I would like to get all likes (if possible with user ids) for all pages on my domain (which has tens of thousands of pages)

What does domain_like_adds actually return?

SELECT metric, value FROM insights WHERE object_id=[domain-id] AND metric='domain_like_adds' AND end_time=end_time_date('2011-01-03') AND period=period('month')

Returns blank, does anyone know what data domain_like_adds returns?

Regards, Niklas

回答1:

I don't think there's any way you're going to get user IDs as that is a major privacy invasion, but I believe domain_like_adds indicates how many NEW likes your domain got in the given time period, as opposed to the cumulative likes your domain has earned until that point. It doesn't appear there's a viable way to determine the # of likes of all objects in your domain for all time without tracking it from the beginning and/or going back and summing up historical data.



回答2:

You can make a sitemap.xml of your site and crawl the urls against the Facebook Graph API. I actually made a Ruby script to do this: http://bobbelderbos.com/2012/01/ruby-script-facebook-like-stats-blog/. I don't think you can get the users that 'liked' your pages, but this script might be useful to find out what URLs are most popular.