Skip to content

Instantly share code, notes, and snippets.

Created August 17, 2014 19:57
Show Gist options
  • Save anonymous/b92bc555fa63d0d50b41 to your computer and use it in GitHub Desktop.
Save anonymous/b92bc555fa63d0d50b41 to your computer and use it in GitHub Desktop.
string productId = "YOUR_WINDOWS_PHONE_STORE_ID";
string facebookAppId = "YOUR_FACEBOOK_APP_ID";
string redirectUri = "msft-"+productId+"://authorize";
string scope = "public_profile,email"; // What you want to fetch from the facebook user
string responseType = "token"; // Other response types possible
UriBuilder authUri = new UriBuilder("https://www.facebook.com/dialog/oauth");
authUri.Query = "client_id=" + facebookAppId + "&redirect_uri=" + redirectUri + "&scope=" + scope + "&response_type=" + responseType;
DefaultLaunch(authUri.Uri);
async void DefaultLaunch(Uri uriToLaunch)
{
var success = await Windows.System.Launcher.LaunchUriAsync(uriToLaunch);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment