Closed GoogleCodeExporter closed 9 years ago
Can you include the code just so I can reliably reproduce and verify? Thanks!
Original comment by m...@xmog.com
on 13 Dec 2011 at 7:06
Of course! :)
Here is the code. targeting_spec is a valid Targeting String like
{'age_min':'18','age_max':'65','countries':['DE']}
FacebookWebRequestor requestor = new FacebookWebRequestor();
DefaultJsonMapper jsonMapper = new DefaultJsonMapper();
String requestParameter = "act_"+account.getExtAccountId()+"/reachestimate?currency=EUR&targeting_spec=" + targeting_spec;
FacebookClient fbc = new DefaultFacebookClient(accessToken, requestor, jsonMapper);
String requestedStats = fbc.fetchObject(requestParameter, String.class);
Original comment by chex...@googlemail.com
on 14 Dec 2011 at 8:09
Sorry for the very late response...you should specify URL parameters like this:
fbc.fetchObject("act_"+account.getExtAccountId()+"/reachestimate",
String.class, Parameter.with("currency", "EUR"),
Parameter.with("targeting_spec", "..."));
Instead of hardcoding a JSON string for targeting_spec, you can pass in a Map
or your own @Facebook-annotated class for the value of Parameter.with() and
RestFB will automatically marshal it to JSON.
Original comment by m...@xmog.com
on 12 Jan 2012 at 7:28
I think this is not an issue, closing out...
Original comment by m...@xmog.com
on 2 Sep 2012 at 1:57
Original issue reported on code.google.com by
chex...@googlemail.com
on 13 Dec 2011 at 2:35