facebook graph api - Social Login For Restful API's -
i passing on client id , client secret not able receive access token. doing wrong on here. please tell me have accesstoken , authenticated.
googleconnectionfactory connectionfactory = new googleconnectionfactory("clientid","clientsecret"); oauth2operations oauthoperations =connectionfactory.getoauthoperations(); oauth2parameters params = new oauth2parameters(); params.setredirecturi(""); string authorizeurl = oauthoperations.buildauthenticateurl(granttype.implicit_grant,params); accessgrant accessgrant = oauthoperations.exchangeforaccess(authorizationcode, "https://my-callback-url", null); connection<google> connection = connectionfactory.createconnection(accessgrant); system.out.println("authorize url is:"+authorizeurl); google google = new googletemplate(); system.out.println(google.isauthorized()); system.out.println(google.driveoperations()); system.out.println(google.getaccesstoken());
Comments
Post a Comment