Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2014 20:02
Show Gist options
  • Save anonymous/a5c16e3d2bbb66a134bf to your computer and use it in GitHub Desktop.
Save anonymous/a5c16e3d2bbb66a134bf to your computer and use it in GitHub Desktop.
protected override void OnActivated(IActivatedEventArgs args)
{
if (args.Kind == ActivationKind.Protocol)
{
ProtocolActivatedEventArgs eventArgs = args as ProtocolActivatedEventArgs;
WwwFormUrlDecoder decoder = new WwwFormUrlDecoder(eventArgs.Uri.Fragment);
string fbAccessToken = decoder.GetFirstValueByName("#access_token");
/* Now you can use the access token to interact with the Facebook API */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment