Added Facebook Api and example
This commit is contained in:
1 parent
9ea686a3f8
commit
1f36fd0f32
3 files changed
+77
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package org.scribe.builder.api;
|
||||
|
||||
import org.scribe.exceptions.*;
|
||||
import org.scribe.model.*;
|
||||
|
||||
public class FacebookApi extends DefaultApi20
|
||||
{
|
||||
private static final String AUTHORIZE_URL = "https://graph.facebook.com/oauth/authorize?response_type=token&client_id=%s&redirect_uri=%s";
|
||||
@Override
|
||||
public String getAuthorizationUrl(OAuthConfig config)
|
||||
{
|
||||
if(OAuthConstants.OUT_OF_BAND.equals(config.getCallback()))
|
||||
throw new OAuthException("Facebook does not support oob authentication.");
|
||||
return String.format(AUTHORIZE_URL, config.getApiKey(), config.getCallback());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user