Register / Login
Win a copy of
The Way of the Web Tester: A Beginner's Guide to Automating Tests
this week in the
Java in General
RestFB Insights question
posted 5 years ago
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!
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