bobolounna / restfb

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

"post_id" when posting to me/photos #185

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Post to your own wall.
2.
3.

What is the expected output? What do you see instead?
The output is fine, the class the deserializes the json (FacebookTypes.java) 
does not have a post_id in it, or an accessor method, thus there is no way to 
get that data.

What version of the product are you using? On what operating system?
1.6.9 on Mac OS 10.6.8

Please provide any additional information below.
INFO: Executing a POST to https://graph.facebook.com/me/photos with parameters 
...
INFO: Facebook responded with HTTP status code 200 and response body: 
{"id":"219542701491839","post_id":"100003083339067_219457058167070"}

Original issue reported on code.google.com by madden....@gmail.com on 26 Apr 2012 at 11:54

GoogleCodeExporter commented 8 years ago
Hi there - this is expected behavior.  It's not realistic to provide canned 
classes for everything FB can return, so the onus is on you to write your own.  
For example:

public class PostResponse extends FacebookType {
  @Facebook("post_id")
  private String postId;

  public String getPostId() {
    return postId;
  }
}

...

PostResponse postResponse = facebookClient.publish("me/feed", 
PostResponse.class, Parameter.with("message", "RestFB test"));

Original comment by m...@xmog.com on 27 Apr 2012 at 1:37