public class SignedRequestDecoder extends Object
| Constructor and Description |
|---|
SignedRequestDecoder(String secret) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,?> |
decodeSignedRequest(String signedRequest)
Decodes a signed request, returning the payload of the signed request as a Map
|
<T> T |
decodeSignedRequest(String signedRequest,
Class<T> type)
Decodes a signed request, returning the payload of the signed request as a specified type.
|
public SignedRequestDecoder(String secret)
secret - the application secret used in creating and verifying the signature of the signed request.public Map<String,?> decodeSignedRequest(String signedRequest) throws SignedRequestException
signedRequest - the value of the signed_request parameter sent by Facebook.SignedRequestException - if there is an error decoding the signed requestpublic <T> T decodeSignedRequest(String signedRequest, Class<T> type) throws SignedRequestException
T - the Java type to bind the signed_request to.signedRequest - the value of the signed_request parameter sent by Facebook.type - the type to bind the signed_request to.SignedRequestException - if there is an error decoding the signed request