Spring Social Facebook

org.springframework.social.facebook.connect
Class FacebookOAuth2Template

java.lang.Object
  extended by org.springframework.social.oauth2.OAuth2Template
      extended by org.springframework.social.facebook.connect.FacebookOAuth2Template
All Implemented Interfaces:
org.springframework.social.oauth2.OAuth2Operations

public class FacebookOAuth2Template
extends org.springframework.social.oauth2.OAuth2Template

Facebook-specific extension of OAuth2Template to use a RestTemplate that recognizes form-encoded responses as "text/plain". Facebook token responses are form-encoded results with a content type of "text/plain", which prevents the FormHttpMessageConverter registered by default from parsing the results.

Author:
Craig Walls

Constructor Summary
FacebookOAuth2Template(java.lang.String clientId, java.lang.String clientSecret)
           
 
Method Summary
protected  org.springframework.web.client.RestTemplate createRestTemplate()
           
protected  org.springframework.social.oauth2.AccessGrant postForAccessGrant(java.lang.String accessTokenUrl, org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> parameters)
           
 
Methods inherited from class org.springframework.social.oauth2.OAuth2Template
buildAuthenticateUrl, buildAuthorizeUrl, createAccessGrant, exchangeForAccess, getRestTemplate, refreshAccess, setRequestFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacebookOAuth2Template

public FacebookOAuth2Template(java.lang.String clientId,
                              java.lang.String clientSecret)
Method Detail

createRestTemplate

protected org.springframework.web.client.RestTemplate createRestTemplate()
Overrides:
createRestTemplate in class org.springframework.social.oauth2.OAuth2Template

postForAccessGrant

protected org.springframework.social.oauth2.AccessGrant postForAccessGrant(java.lang.String accessTokenUrl,
                                                                           org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> parameters)
Overrides:
postForAccessGrant in class org.springframework.social.oauth2.OAuth2Template

Spring Social Facebook