protected Facebook getFacebookClient() { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthAppId(configuration.getOauth().getAppId()) .setOAuthAppSecret(configuration.getOauth().getAppSecret()) .setOAuthAccessToken(configuration.getOauth().getUserAccessToken()) .setOAuthPermissions(ALL_PERMISSIONS) .setJSONStoreEnabled(true); FacebookFactory ff = new FacebookFactory(cb.build()); Facebook facebook = ff.getInstance(); return facebook; }
private static Facebook getFacebookInstance() { ConfigurationBuilder cb = new ConfigurationBuilder(); cb.setDebugEnabled(true) .setOAuthAppId("234325323402662") .setOAuthAppSecret("0d7b58e8ebb505Fbb5931e20ab54aec3") .setOAuthAccessToken("234325323402662|FTEqveXyBMD7lAZVJMBdNLUxTA0") // FTEqveXyBMD7lAZVJMBdNLUxTA0 .setOAuthPermissions( "email, publish_stream, id, name, first_name, last_name, read_stream , generic") .setUseSSL(true) .setJSONStoreEnabled(true); Configuration configuration = cb.build(); FacebookFactory factory = new FacebookFactory(configuration); return factory.getInstance(); }
public abstract class FacebookHandler { public static final String APP_ID = "321963097941455"; public static final String App_Secret = "7fe4138a051faddffc05f055ef59a015"; public static final Facebook facebook = FacebookFactory.getSingleton(); static { facebook.setOAuthAppId(APP_ID, App_Secret); } class FacebookAuthGrabber implements Runnable { public FacebookAuthGrabber() {} @Override public void run() {} private void storeAuth() {} } }