I am very new do both Facebook insight and to OData. I am new to programing in general so bear with me. (I just learned about Maven, dependency, JDBC and stuff).
My major problem is that I don't have enough knowledge to开发者_C百科 even understand the docs and examples., so...
Looking at odata4j, I do understand that everything starts with:
ODataConsumer c = ODataConsumer.create(String serviceRootUri) ;
What is the serviceRootUri and how do I find the one that belongs to Facebook insights?
What I have is:
- registered app with facebook. I already can see the data I want to pull (using with odata4j) by going to the insights webpage. I just want to automate the pulling of the data with a Java app that will store the info into a database.
- I already have an access_token for the app (along with app_key and app_secret)
Should serviceRootUri for FB look smth like this?
https://graph.facebook.com/{app-id-goes-here}/insights?access_token={access-token-goes-here}
OData.org list all the producers and consumers available in the real world for OData as of now. Facebook insights is a producer meaning it exposes a OData service for Facebook Insights.
Have a look at the following URL : http://www.odata.org/producers
Check out the section : Live OData Services.
The Facebook Insights OData Service is avilable at : http://facebook-insights.cloudapp.net/
So thats the OData Service Root URI. That exposes what we call as collections or entitysets. Each collection will be nothing but a rows of data and you can work with them to build a table or whatever visualization you want.
Check out http://developers.facebook.com/docs/reference/api for all such matters.
精彩评论