Package facebook4j.auth

Examples of facebook4j.auth.OAuthAuthorization


    protected Facebook createFacebook() {
        ConfigurationBuilder cb = new ConfigurationBuilder();
        cb.setOAuthAppId(p.getProperty("oauth.appId")).setOAuthAppSecret(p.getProperty("oauth.appSecret"));
        cb.setOAuthAccessToken(p.getProperty("oauth.accessToken"));
        Authorization auth = new OAuthAuthorization(cb.build());
        return new FacebookFactory().getInstance(auth);
    }
View Full Code Here


    }

    private HttpParameter[] setAppSecretProofParameter(HttpParameter[] parameters, Authorization authorization) {
        if (authorization == null) return parameters;
        if (!(authorization instanceof OAuthAuthorization)) return parameters;
        OAuthAuthorization oAuthAuthorization = (OAuthAuthorization) authorization;
        if (!oAuthAuthorization.isAppSecretProofEnabled()) return parameters;
        String appSecretProof = oAuthAuthorization.generateAppSecretProof();
        return HttpParameter.merge(parameters,  new HttpParameter("appsecret_proof", appSecretProof));
    }
View Full Code Here

TOP

Related Classes of facebook4j.auth.OAuthAuthorization

Copyright © 2018 www.massapicom. 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.