alfdev / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

Summary is null when i fetch a post from a group discussion #123

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
this is the code I used
final LinkedInApiClient client = factory.createLinkedInApiClient(token, 
tokenSecret);
Posts posts = client.getPostsByGroup(77700, 0, 20);
for (Post post : posts.getPostList()) {
System.err.print(post.getSummary());
}

the Summary is null, why ??

What version of the product are you using? On what operating system?
version 1.0.429 , on linux opensuse

Original issue reported on code.google.com by cercleim...@gmail.com on 28 Sep 2012 at 10:25

GoogleCodeExporter commented 9 years ago
I found a solution , I should specify summary field :
Set<PostField> fields = new  HashSet<PostField>();
fields.add(PostField.SUMMARY);
//... add other fields
Posts posts = client.getPostsByGroup(gid, fields, 0, 20);

Original comment by cercleim...@gmail.com on 28 Sep 2012 at 11:20

GoogleCodeExporter commented 9 years ago
Thanks, cercleim...@gmail.com!  I'm having a hard time using Groups with 
linkedin-j due to the complete dearth of documentation.  

This post saved me a bunch of time figuring it out myself.  Thanks!

Original comment by jjdemp...@gmail.com on 7 Feb 2013 at 9:36