Which page has the most fans on Facebook?

How do I import the number of Facebook fans or page likes on my company's Facebook page into Microsoft Excel or Google Sheets?

  • I have looked everywhere for this. I am new to APIs and XML in general but it would be cool to have this. I have already figured out how to do a number of cool things with Google Spreadsheets from this post:http://www.distilled.co.uk/blog/seo/how-to-build-agile-seo-tools-using-google-docs/ and this post:http://www.seomoz.org/blog/how-to-track-your-social-media-strategy but I would like to finish it off with being able to import the number of fans/likes that my company page has to create an awesome internal company report. Let me know if you have any ideas. Thanks in advance!

  • Answer:

    Hey, glad you liked my blog posts :) I had to play around a little but you can get this data using the Facebook Graph API: http://graph.facebook.com/Distilled This gives you data like this: {    "id": "7370493884",    "name": "Distilled",    "picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/50503_7370493884_6856516_s.jpg",    "link": "https://www.facebook.com/Distilled",    "category": "Internet/software",    "likes": 468,    "website": "http://www.distilled.co.uk",    "username": "Distilled",    "founded": "2005",    "location": {       "street": "2nd Floor, 72 Cannon Street",       "city": "London",       "country": "United Kingdom",       "zip": "EC4N 6AE"    },    "public_transit": "London Cannon Street Train/Tube Station",    "phone": "020 7183 0767" } If you have a read of my SEOmoz post you should be able to pull that into Google Docs using a query like this: function FBlikes(pagename) {   var jsondata = UrlFetchApp.fetch("http://graph.facebook.com/"+pagename);   var object = Utilities.jsonParse(jsondata.getContentText());   return object.likes; } Let me know if that doesn't work :) Tom

Tom Critchlow at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.