Automate data export to Facebook Insights

I am looking for a way to programmatically export Facebook data for my pages so that I can automate it. In particular, I would like to create a scheduled task that runs daily, and which can save a CSV or Excel data file with page information using the Facebook API. Then I would have an ETL job that puts this data into the database.

I checked the oData service for Excel, which seems to have been broken. Does anyone know how to programmatically automate the export of data data for Facebook pages?

+4
source share
5 answers

You will need to write something that uses the Insights part of the Facebook Graphics API . I have not seen what has already been written for this.

+3
source

This is possible and not too difficult if you know how to access information.

This is how I continue:

  • Log in using the offline_access and read_insights functions. read_insights allows me to access all the pages and applications that the user administers. offline_access gives me a constant token that I can use to update information without having to wait for a user to log in.
  • Get a list of pages and applications that the user administers and save them in a database.
  • When I want to get an idea about a page or application, I donโ€™t request FQL, I turn to the Graph API: First I calculate how many queries are required for graph.facebook.com/[object_idapter/insights, according to the selected date range. Then I create a request for use with the Batch API ( http://developers.facebook.com/docs/reference/api/batch/ ). This allows me to get all the data for all the available information for all days in a date range in only one query.
  • I am analyzing a rather large json object received (which weighs a few MB, keep this in mind) and save everything in the database.
  • Now that you have all the ideas analyzed and stored in the database, you are just a few SQL queries from manipulating the data the way you want, for example, displaying charts or exporting in CSV or Excel format.

I already have the code (and published as a temporarily free tool www.social-insights.net ), so exporting to excel will be pretty quick and easy.

Let me know if I can help you with this. This can be done before the weekend.

+4
source

Check out http://megalytic.com . This is a service that exports FB Insights (along with Google Analytics, Twitter and some others) to Excel.

0
source

A new tool is available: Analytics Edge add-ons now have a Facebook connector, which makes downloading fast. http://www.analyticsedge.com/facebook-connector/

0
source

There are several ways to do this. I would suggest that your choice depends on two factors:

  • What is your level of coding skills?
  • How much data do you want to move?

I cannot answer 1 for you, but in your case you do not move so much data (in relative terms). I will continue to share three options.

DIFFICULT CODE IT

To do this, you need a script that accesses Facebook GraphAPI AND the computer / server to process this request automatically. I primarily use AWS and suggest you run EC2 and whether you plan to run your script X times. I have not used AWS Pipeline, but I know that it is designed in such a way that you can run it automatically script ... presumably with a little server know-how

USE THIRD PARTY ADD

There are many people who have the same data. This has led to a number of easy-to-use tools. I use Supermetrics Free to periodically audit and validate our tools. Supermetrics is fast and has a very simple interface for accessing the Facebook API and several others. I believe that you can also plan updates and updates with it.

USE THIRD PARTY FULL-SERVICE ETL There are also several services or freelancers that can configure this for you, without having to work on your own. Depending on where you want the data. Stitch is the service I worked with in FB ads. There may be better services, but he has fulfilled our needs at the moment.

MY SUGGESTION

You are probably best off using third-party add-ons such as Supermetrics. It is fast and easy to use. Other methods may be more interesting if you had a lot more data to move around or needed to update more often than daily.

0
source

All Articles