Skip to content

Commit

Permalink
Added Service Logo
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinesd committed Mar 3, 2011
1 parent dde31ef commit d1d1f23
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Expand Up @@ -94,5 +94,12 @@ public interface OAuthServiceHandler
* @param verifierStr
*/
public void setVerifier(String verifierStr);


/**
* Gives the logo of the service
* @return the URL of the logo for the service
*/
public String getServiceLogo();

}
Expand Up @@ -35,6 +35,7 @@ public class LinkedInHanlderBean extends OAuthServiceHandlerScribe implements Li

private static final long serialVersionUID = -6718362913575146613L;
static final Class<? extends Api> API_CLASS = LinkedInApi.class;
static final String LOGO_URL = "https://d2l6uygi1pgnys.cloudfront.net/1-9-05/images/buttons/linkedin_connect.png";



Expand All @@ -55,4 +56,13 @@ protected Class<? extends Api> getApiClass()
return API_CLASS;
}

/* (non-Javadoc)
* @see org.jboss.seam.social.oauth.OAuthServiceHandler#getServiceLogo()
*/
@Override
public String getServiceLogo()
{
return LOGO_URL;
}

}
Expand Up @@ -45,6 +45,7 @@ public class TwitterHandlerBean extends OAuthServiceHandlerScribe implements Twi
static final String TWEET_URL = "https://api.twitter.com/1/statuses/update.json";
static final String RETWEET_URL = "https://api.twitter.com/1/statuses/retweet/{tweet_id}.json";
static final Class<? extends Api> API_CLASS = TwitterApi.class;
static final String LOGO_URL = "http://twitter-badges.s3.amazonaws.com/twitter-a.png";



Expand All @@ -62,6 +63,7 @@ public void setSettings(@Twitter OAuthServiceSettings settings)
public Tweet updateStatus(String message)
{
HttpResponse resp = sendSignedRequest(RestVerb.POST, TWEET_URL, "status", message);
System.out.println("update satus is " + message);
return jsonMapper.readValue(resp, TweetJackson.class);

}
Expand Down Expand Up @@ -90,4 +92,15 @@ public Credential verifyCrendentials()
return jsonMapper.readValue(resp, CredentialJackson.class);
}



/* (non-Javadoc)
* @see org.jboss.seam.social.oauth.OAuthServiceHandler#getServiceLogo()
*/
@Override
public String getServiceLogo()
{
return LOGO_URL;
}

}

0 comments on commit d1d1f23

Please sign in to comment.