Package com.restfb

Examples of com.restfb.DefaultLegacyFacebookClient.execute()


  public static void main(String[] args) {
    LegacyFacebookClient facebookClient = new DefaultLegacyFacebookClient(MY_ACCESS_TOKEN);

    // Last parameter specifies that this API call's result should be returned
    // to us as a Long value.
    Long uid = facebookClient.execute("users.getLoggedInUser", Long.class);

    System.out.println("My UID is " + uid);

    // FQL query which asks Facebook for your friends' names, profile picture
    // URLs, and network affiliations
View Full Code Here


    // Send the request to Facebook.
    // We specify the session key to use to make the call, the fact that we're
    // expecting a String response, and the attachment (defined above).
    String postId =
        facebookClient.execute("stream.publish", String.class,
          Parameter.with("attachment", attachment));

    System.out.println("Post ID is " + postId);
  }
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.