Package org.encuestame.social.api

Examples of org.encuestame.social.api.TwitterAPITemplate


                } else {
                    log.warn("This account already exist");
                    throw new EnMeExistPreviousConnectionException(getMessage("social.repeated.account"));
                }
            } else if (socialProvider.equals(SocialProvider.TWITTER)) {
                TwitterAPIOperations operations = new TwitterAPITemplate(consumerSecret, apiKey, accessToken.getValue(),
                        accessToken.getSecret());
                SocialUserProfile profile = operations.getProfile();
                log.debug("twitter profile "+profile.toString());
                final SocialAccount socialAccount = getSecurityService().getCurrentSocialAccount(socialProvider, profile.getId());
                if (socialAccount == null) {
                    getSecurityService().addNewSocialAccount(
                            accessToken.getValue(), accessToken.getSecret(), null, profile,
View Full Code Here


           throws EnMeExpcetion {
        TweetPublishedMetadata published = new TweetPublishedMetadata();
        log.debug("publicTweetPoll:{ "+tweetText);
        if (socialAccount.getAccounType().equals(SocialProvider.TWITTER)) {
            log.debug("Publish on TWITTER");
            final TwitterAPIOperations twitterAPIOperations = new TwitterAPITemplate(
                    EnMePlaceHolderConfigurer.getProperty("twitter.oauth.consumerSecret"),
                    EnMePlaceHolderConfigurer.getProperty("twitter.oauth.consumerKey"),
                    socialAccount);
            try {
                published = twitterAPIOperations.updateStatus(tweetText);
            } catch (Exception e) {
                log.error(e);
                e.printStackTrace();
            }
        } else if (socialAccount.getAccounType().equals(SocialProvider.IDENTICA)) {
View Full Code Here

TOP

Related Classes of org.encuestame.social.api.TwitterAPITemplate

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.