Skip to content

Commit

Permalink
Merge pull request scribejava#147 from dreamcwli/master
Browse files Browse the repository at this point in the history
Mobile Plurk Api
  • Loading branch information
fernandezpablo85 committed Sep 25, 2011
2 parents 40c8a27 + c6bff31 commit ce139bb
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/java/org/scribe/builder/api/PlurkApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class PlurkApi extends DefaultApi10a
{
private static final String REQUEST_TOKEN_URL = "http://www.plurk.com/OAuth/request_token";
private static final String AUTHORIZE_URL = "http://www.plurk.com/OAuth/authorize?oauth_token=%s";
private static final String AUTHORIZATION_URL = "http://www.plurk.com/OAuth/authorize?oauth_token=%s";
private static final String ACCESS_TOKEN_URL = "http://www.plurk.com/OAuth/access_token";

@Override
Expand All @@ -17,12 +17,23 @@ public String getRequestTokenEndpoint()
@Override
public String getAuthorizationUrl(Token requestToken)
{
return String.format(AUTHORIZE_URL, requestToken.getToken());
return String.format(AUTHORIZATION_URL, requestToken.getToken());
}

@Override
public String getAccessTokenEndpoint()
{
return ACCESS_TOKEN_URL;
}

public class Mobile extends PlurkApi
{
private static final String AUTHORIZATION_URL = "http://www.plurk.com/m/authorize?oauth_token=%s";

@Override
public String getAuthorizationUrl(Token requestToken)
{
return String.format(AUTHORIZATION_URL, requestToken.getToken());
}
}
}

0 comments on commit ce139bb

Please sign in to comment.