org.springframework.social.facebook
Class FacebookWebArgumentResolver

java.lang.Object
  extended by org.springframework.social.facebook.FacebookWebArgumentResolver
All Implemented Interfaces:
WebArgumentResolver

public class FacebookWebArgumentResolver
extends java.lang.Object
implements WebArgumentResolver

Web argument resolver that resolves arguments annotated with FacebookAccessToken or FacebookUserId.

After a user has authenticated with Facebook via the XFBML <fb:login-button> tag, their user ID and an access token are stored in a cookie whose name is "fbs_{application key}". This web argument resolver extracts that information from the cookie (if available) and supplies it to a controller handler method as String values.


Field Summary
 
Fields inherited from interface org.springframework.web.bind.support.WebArgumentResolver
UNRESOLVED
 
Constructor Summary
FacebookWebArgumentResolver(java.lang.String apiKey)
           
 
Method Summary
 java.lang.Object resolveArgument(MethodParameter parameter, NativeWebRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacebookWebArgumentResolver

public FacebookWebArgumentResolver(java.lang.String apiKey)
Method Detail

resolveArgument

public java.lang.Object resolveArgument(MethodParameter parameter,
                                        NativeWebRequest request)
                                 throws java.lang.Exception
Specified by:
resolveArgument in interface WebArgumentResolver
Throws:
java.lang.Exception