bobolounna / restfb

Automatically exported from code.google.com/p/restfb
0 stars 0 forks source link

fetchObject of Location does not work #192

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Location userLoc = new DefaultFacebookClient().fetchObject("105500002816247", 
Location.class);

What is the expected output? What do you see instead?
The location details of valencia should be in the Location instance, but every 
value of the Location instance is null.

What version of the product are you using? On what operating system?
restfb 1.6.9

Please provide any additional information below.
You can get the location as JsonObject for example by 
JsonObject location = new 
DefaultFacebookClient().fetchObject("105500002816247", JsonObject.class, 
Parameter.with("fields", "location"));

Original issue reported on code.google.com by tron.cos...@gmail.com on 29 May 2012 at 2:04

GoogleCodeExporter commented 8 years ago
I think you mean to fetch a Page object - that's what 105500002816247 is.  
Location is not really a graph type (see FB's documentation and the RestFB 
javadoc), it's just a RestFB type that's nested in several FB types.

Try fetching Page.class instead and let me know if that works for you.

Original comment by m...@xmog.com on 29 May 2012 at 2:13

GoogleCodeExporter commented 8 years ago
this works! sorry for the bugreport, but maybe this will help someone else!

Original comment by tron.cos...@gmail.com on 29 May 2012 at 2:24

GoogleCodeExporter commented 8 years ago
Thanks!  Closing out.

Original comment by m...@xmog.com on 12 Jun 2012 at 1:35