public static string GetFacebookLoginURL(PendingMessage pendingMessage, string facebookOauthCallback)
        {
            var redirectUri = GetOAuthCallBack(pendingMessage.userId, pendingMessage.conversationId, facebookOauthCallback);
            var uri         = GetUri("https://www.facebook.com/dialog/oauth",
                                     Tuple.Create("client_id", FacebookAppId),
                                     Tuple.Create("redirect_uri", redirectUri),
                                     Tuple.Create("response_type", "code"),
                                     Tuple.Create("scope", "public_profile,email"),
                                     Tuple.Create("state", Convert.ToString(new Random().Next(9999)))
                                     );

            return(uri.ToString());
        }
示例#2
0
 /// <summary>
 /// Constructs an instance of the SimpleFacebookAuthDialog
 /// </summary>
 /// <param name="msg"></param>
 public SimpleFacebookAuthDialog(Message msg)
 {
     pendingMessage = new PendingMessage(msg);
 }