Sample.java :  » UnTagged » snaio » org » elephantt » javabook » client » Android Open Source

Android Open Source » UnTagged » snaio 
snaio » org » elephantt » javabook » client » Sample.java
package org.elephantt.javabook.client;

import net.sf.json.JSONObject;

public class Sample {
public static void main(String[] args) {
  String apiKey = "534e5d4780fb2e3178513cf9067fa543"; // YOUR API KEY
    String secret = "8954c71c87ac51826092c5e55857b67e"; // YOUR SECRET

    // Just create one of these for your app/process
    FacebookRpcClient fbRpcClient = new FacebookRpcClient(apiKey, secret);

    // You just need one of these for your app, too
    FacebookClient fbClient = new FacebookClient(fbRpcClient);

    String authToken = ""; // an auth token you've received

    // creates a session from the auth token
    //FacebookSession session = fbClient.createSessionKeyForAuthToken(authToken);
    //FacebookSessionClient fbSessionClient = new FacebookSessionClientImpl(App.getServer().getFacebookRpcClient(), session);

    //JSONObject obj = fbSessionClient.queryForObject("select first_name from user where uid=" + session.getUid());

    //String name = obj.getString("first_name");
}
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.