Search within Java in General
Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Java in General
RestFB Insights question
posted 11 years ago
Number of slices to send:
Optional 'thank-you' note:
This is a facebook RestFb question:
I'm trying to read insights from a page. I followed all the steps for
getting the access_token and I can get data by submitting this url:
getting a long json object with what seems to be all the data.)
But when I try the same process through the restFb api the data returns null.
Here's what I'm doing:
Page page = facebookClient.fetchObject(pageId, Page.class); String id = page.getId(); String query = "SELECT metric, value FROM insights WHERE object_id=" + id + " AND metric='page_wall_posts'" + " AND end_time=end_time_date('2011-02-13') AND period=period('day')"; List insights = facebookClient.executeQuery(query, FqlUser.class); System.out.println("insights size = " + insights.size()); System.out.println("insights object = " + insights.get(0));
This produces insights.size = 1 and insights object = null.
So, why is it always null? There are wall posts for this page, and as I said the large json object certainly has data.
Thank you very much for your help!
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
the value of filler advertising in 2021
Boost this thread!
Unable to fetch results using createQuery
Struts2-json plugin not serializing action class to json
wrestling with json
Java Representation of JSON String
A 404 Error, need help configuring web.xml