/gist:a67081576f0ff50edf3a Secret
Created
January 26, 2013 19:21
Star
You must be signed in to star a gist
GetFacebookContext
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static FacebookContext GetFacebookContext(string signedRequest) | |
{ | |
var client = GlobalFacebookConfiguration.Configuration.ClientProvider.CreateClient(); | |
dynamic parsedSignedRequest = client.ParseSignedRequest(signedRequest); | |
string accessToken = parsedSignedRequest.oauth_token; | |
client.AccessToken = accessToken; | |
return new FacebookContext | |
{ | |
AccessToken = accessToken, | |
Client = client, | |
Configuration = GlobalFacebookConfiguration.Configuration, | |
UserId = parsedSignedRequest.user_id, | |
SignedRequest = parsedSignedRequest | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment