0

So in order to get the insight data for my application I need the access_token with read_insight_data permission. However I don't want a user interaction during the process. Can I get my application's insight data with just application ID and secret?

thanks, Green

Gelin Luo
  • 14,035
  • 27
  • 86
  • 139

1 Answers1

0

Okay I got it.

First, get client(AKA application) access token:

https://graph.facebook.com/oauth/access_token?client_id=${client_id}&client_secret=${client_secret}&grant_type=client_credentials

facebook will return something looks like:

access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Second Use that returned token you can get the application insight data:

https://graph.facebook.com/${client_id}/insights/?access_token=XXXXXXXXXXXXXXXXXXXXXXXXX
Gelin Luo
  • 14,035
  • 27
  • 86
  • 139
  • This does not work for me - I also got the app access token, the properared the call and tried in a browser. I get this: { "error": { "message": "An unknown error has occurred.", "type": "OAuthException", "code": 1 } } – Sven Haiges Dec 12 '12 at 11:42