1

A client is looking for a way to download metrics from Facebook regarding their website and aggregate them in their database for reports on website usage. After some study it became evident that Facebook allows users to download this information from it's web page as CSV files or through the Graph API.

Ideally I should implement a windows application which can be turned into a daily scheduled job that will:

  1. Go to Facebook and download the visit/like/unlike/... information for that page.
  2. Convert the information to a useful format
  3. Save it to database.

The main issue I am facing is that all C# the examples in the wild deal with authentication on web applications using Facebook. On all examples using the API through direct calls or C# Facebook SDK an authentication token is used. From what I read there is not way to get a Facebook permanent token anymore.

My questions are: 1. Is there a way to make sure I can authenticate to get user statistics without displaying a login window? 2. Is there any other way to extract the desired information from Facebook?

Any clarifications, suggestions or examples would be greatly appreciated.

Thanks and have a good weekend,

Community
  • 1
  • 1
Constantin
  • 465
  • 4
  • 18

1 Answers1

0

Have you tried https://facebookpsmodule.codeplex.com? PowerShell is probably easier than C# for this task. Your particular scenario regarding like/unlike statistics is new to me but should be workable, through Get-FBObjectData if not a higher-level interface.

At some point you will need to go through the login window to get an access token. You should be able to use offline_access to generate a token which you can cache (FacebookPSModule does this automatically) and which will last for months. However Facebook is changing its policies w.r.t. offline_access and I'm still gathering information about this.

Jon Newman
  • 238
  • 1
  • 11