A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Java in General
RestFB Insights question
Joined: Feb 16, 2010
Feb 15, 2011 07:47:50
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!
subject: RestFB Insights question
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
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014