Package com.restfb

Examples of com.restfb.DefaultFacebookClient.fetchObject()


  @Test
  public void checkPostWithCommentsAndLikes() {
    DefaultFacebookClient client = new DefaultFacebookClient(getAccessToken(), Version.VERSION_2_1);
    Post gotPost =
        client.fetchObject("74133697733_10152424266332734", Post.class,
          Parameter.with("fields", "from,to,likes.summary(true),comments.summary(true)"));
    assertNotNull(gotPost);
    assertTrue(gotPost.getLikesCount() > 0);
    assertTrue(gotPost.getLikes().getCount() > 0);
    assertEquals(gotPost.getLikesCount(), gotPost.getLikes().getCount());
View Full Code Here


    try {
      FacebookClient facebookClient = new DefaultFacebookClient();

      // You'll notice that logging statements from this call are bridged from java.util.logging to Log4j
      User user = facebookClient.fetchObject("btaylor", User.class);

      // ...and of course this goes straight to Log4j
      logger.debug(user);
    } finally {
      // Make sure to tear down when you're done using the bridge
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.