当前位置: 首页>>代码示例>>C#>>正文


C# FacebookClient.GetLogoutUrl方法代码示例

本文整理汇总了C#中Facebook.FacebookClient.GetLogoutUrl方法的典型用法代码示例。如果您正苦于以下问题:C# FacebookClient.GetLogoutUrl方法的具体用法?C# FacebookClient.GetLogoutUrl怎么用?C# FacebookClient.GetLogoutUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Facebook.FacebookClient的用法示例。


在下文中一共展示了FacebookClient.GetLogoutUrl方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnLogout_Click

 private void btnLogout_Click(object sender, EventArgs e)
 {
     var webBrowser = new WebBrowser();
     var fb = new FacebookClient();
     var logouUrl = fb.GetLogoutUrl(new { access_token = _accessToken, next = "https://www.facebook.com/connect/login_success.html" });
     webBrowser.Navigate(logouUrl);
     btnLogout.Visible = false;
 }
开发者ID:hoooorh4y,项目名称:FB-CSharp-SDK-First-FB-Application,代码行数:8,代码来源:Form1.cs

示例2: button2_Click

 private void button2_Click(object sender, RibbonControlEventArgs e)
 {
     FacebookClient fc = new FacebookClient();
     LoginForm l = new LoginForm(fc.GetLogoutUrl(new
     {
         next = "https://www.facebook.com/connect/login_success.html",
         access_token = ThisAddIn.GetAccessToken()
     }).ToString(), this, false);
     l.Show();
 }
开发者ID:ly2314,项目名称:PowerPointFacebookAPI,代码行数:10,代码来源:Ribbon.cs

示例3: PostToWall

        //AAAIOfwttlbABADAgOfra14zhgQi2V82yNfuscJjLIwX0rT9nqRg4YYbmxZAZByKwq0lYWVvn9f1fIfEbY3i1wmQx2tZAOtpRxqGEDlE2phqiltqLw3X
        //access token for me
        public static void PostToWall(string message, long userId, string wallAccessToken, WebBrowser fBrowser)
        {
            var fb = new FacebookClient(wallAccessToken);
            string url = string.Format("{0}/{1}", userId, "feed");
            var argList = new Dictionary<string, object>();
            argList["message"] = message;
            fb.Post(url, argList);

            var fb2 = new FacebookClient();
            var logoutUrl = fb.GetLogoutUrl(new { access_token = wallAccessToken, next = "https://www.facebook.com/connect/login_success.html" });
            fBrowser.Navigate(logoutUrl);
        }
开发者ID:cbacon91,项目名称:Blacklist,代码行数:14,代码来源:FacebookManager.cs

示例4: Logout

        public static void Logout()
        {
            FacebookClient fb = new FacebookClient();
            Uri logoutUrl = fb.GetLogoutUrl(new
            {
                access_token = _accessToken,
                next = "https://www.facebook.com/connect/login_success.html"
            });

            WebClient client = new WebClient();
            client.DownloadString(logoutUrl);

            _accessToken = null;
        }
开发者ID:huaminglee,项目名称:Parallelity,代码行数:14,代码来源:FacebookManager.cs

示例5: btnLogout_Click

        private void btnLogout_Click(object sender, EventArgs e)
        {
            var fb = new FacebookClient();

            var logoutUrl = fb.GetLogoutUrl(new
                                                {
                                                    next = "https://www.facebook.com/connect/login_success.html",
                                                    access_token = _accessToken
                                                });
            var webBrowser = new WebBrowser();
            webBrowser.Navigated += (o, args) =>
                                        {
                                            if (args.Url.AbsoluteUri == "https://www.facebook.com/connect/login_success.html")
                                                Close();
                                        };

            webBrowser.Navigate(logoutUrl.AbsoluteUri);
        }
开发者ID:jjooeellkkaarrrr,项目名称:facebook-winforms-sample,代码行数:18,代码来源:InfoDialog.cs

示例6: Login

        private void Login()
        {
            dynamic parameters = new ExpandoObject();
            parameters.client_id = AppId;
            parameters.redirect_uri = "https://www.facebook.com/connect/login_success.html";

            parameters.response_type = "token";

            parameters.display = "popup";

            if (!string.IsNullOrWhiteSpace(_ExtendedPermissions))
                parameters.scope = _ExtendedPermissions;

            var fb = new FacebookClient();
            _loginUrl = fb.GetLoginUrl(parameters);
            _logoutUrl = fb.GetLogoutUrl(parameters);

            webBrowser1.Navigate(_loginUrl.AbsoluteUri);
            webBrowser1.Navigate(_logoutUrl.AbsoluteUri);
        }
开发者ID:GorArsakjan,项目名称:facebooklogin,代码行数:20,代码来源:Form1.cs

示例7: Logout

 private void Logout(string accessToken)
 {
     var webBrowser = new WebBrowser();
     var fb = new FacebookClient();
     var logouUrl = fb.GetLogoutUrl(new { access_token = accessToken, next = "https://www.facebook.com/connect/login_success.html" });
     webBrowser.Navigate(logouUrl);
     MyAppSetting.ActiveUser = "0";
 }
开发者ID:niken0793,项目名称:FacebookImageUpload,代码行数:8,代码来源:common.cs

示例8: ProfileImage_Tapped

        private void ProfileImage_Tapped(object sender, TappedRoutedEventArgs e)
        {
            FacebookClient fbclient = new FacebookClient();
            _logoutUrl = fbclient.GetLogoutUrl(new
              {
                  next = "https://www.facebook.com/connect/login_success.html",
                  access_token = App.ObjFBHelper.AccessToken,
                //  redirect_uri =  App.ObjFBHelper._callbackUri.AbsoluteUri,
              });
            ProfileHelpers.IsLogin = false;
            ProfileHelpers.ProfileImage = "";
            WebAuthenticationBroker.AuthenticateAndContinue(_logoutUrl);

               // Frame.Navigate(typeof(Login));
            //BtnLogin.Visibility = Visibility.Visible;
            //BtnLogout.Visibility = Visibility.Collapsed;
        }
开发者ID:duylt,项目名称:wow,代码行数:17,代码来源:MainPage.xaml.cs

示例9: LogOffHome

        public ActionResult LogOffHome()
        {
            Session["UserName"] = null;
            Session["UserGroup"] = null;
            Session["UserID"] = null;

            Session["ExamineeID"] = null;
            Userid = 0;
            if (SessionManagement.GetSessionReturnToString("loginFBmode") != null)
            {

                var oauth = new FacebookClient();
                var logoutParameters = new Dictionary<string, object>
                  {
                     {"access_token",  Session["access_token"]},
                      { "next", Url.Action("Index","Home") }
                  };
                Session["loginFBmode"] = null;
                Session["access_token"] = null;
                var logoutUrl = oauth.GetLogoutUrl(logoutParameters);
                return Redirect(logoutUrl.ToString());
            }

            return RedirectToAction("Index", "Home");
        }
开发者ID:chutinhha,项目名称:portal-cuocthianh,代码行数:25,代码来源:HomeController.cs

示例10: buttonFBlogout_Click

 private void buttonFBlogout_Click(object sender, EventArgs e)
 {
     var webBrowser = new WebBrowser();
     var fb = new FacebookClient();
     var logouUrl = fb.GetLogoutUrl(new { access_token = _accessToken, next = "https://www.facebook.com/connect/login_success.html" });
     webBrowser.Navigate(logouUrl);
     buttonFBlogout.Visible = false;
     textBox1.Text = String.Format("Logged Out from Faceboook");
 }
开发者ID:keithshort1,项目名称:MyLoProto,代码行数:9,代码来源:MyLoForm1.cs

示例11: Logout

 public static string Logout(string access_token)
 {
     try
     {
         FacebookClient client = new FacebookClient(access_token);
         return client.GetLogoutUrl(new { access_token = access_token, next = "https://www.facebook.com/connect/login_success.html" }).ToString();
     }
     catch (Exception)
     {
         return null;
     }
 }
开发者ID:camillu,项目名称:FacebookSearchEngine,代码行数:12,代码来源:FacebookInteraction.cs

示例12: GenerateLogoutUrl

        private Uri GenerateLogoutUrl()
        {
            dynamic parameters = new ExpandoObject();

            var fb = new FacebookClient();
            return fb.GetLogoutUrl(parameters);
        }
开发者ID:kashwaa,项目名称:fb_group_archiver,代码行数:7,代码来源:Browser.cs

示例13: logoutBtn_Click

 private void logoutBtn_Click(object sender, RoutedEventArgs e)
 {
     var fb = new FacebookClient();
     var parameters = new Dictionary<string, object>();
     parameters["next"] = "https://www.facebook.com/connect/login_success.html";
     parameters["access_token"] = ifc.getCurrentUser().FbAccessToken;
     var logoutUrl = fb.GetLogoutUrl(parameters);
     var webBrowser = new WebBrowser();
     webBrowser.Navigate(logoutUrl);
     webBrowser.Navigated += (o, args) =>
     {
         if (args.Uri.AbsoluteUri == "https://www.facebook.com/connect/login_success.html")
         {
             ifc.logoutUser();
             NavigationService.Navigate(new Uri("/BeatIt!;component/AppCode/Pages/Login.xaml", UriKind.Relative));
         }
     };
 }
开发者ID:Grupo6PIS,项目名称:Pruebas-WPhone,代码行数:18,代码来源:Home.xaml.cs

示例14: Logout_Click

 private void Logout_Click(object sender, RoutedEventArgs e)
 {
     lbxMessageMyProfileMessageTB.Text = lbxGlobalScoremessageTB.Text = lbxFriendsScoremessageTB.Text = "Please wait...";
     lbxGlobalScoreMessagePopup.Visibility = Visibility.Visible;
     lbxFriendsScoreMessagePopup.Visibility = Visibility.Visible;
     lbxMessageMyProfileMessagePopup.Visibility=Visibility.Visible;
     var fb = new FacebookClient();
     var parameters = new Dictionary<String, object>();
     parameters["next"] = "https://www.facebook.com/connect/login_success.html";
     parameters["access_token"] = GlobalContext.AccessToken;
     var logouturl=fb.GetLogoutUrl(parameters);
     var webBrowser = new WebBrowser();
     webBrowser.Navigated += (o, args) =>
     {
         if (args.Uri.AbsoluteUri == "https://www.facebook.com/connect/login_success.html")
         {
             GlobalContext.AccessToken = null;
             GlobalContext.g_UserProfile = null;
             Deployment.Current.Dispatcher.BeginInvoke(delegate()
             {
                 DBManager.getInstance().cleanData(DBManager.DB_Profile);
                 NavigationService.GoBack();
             });
         }
         else
         {
             Deployment.Current.Dispatcher.BeginInvoke(delegate()
             {
                 MessageBox.Show("Error,Please try again later", "Error",MessageBoxButton.OK);
             });
         }
         lbxGlobalScoreMessagePopup.Visibility = Visibility.Collapsed;
         lbxFriendsScoreMessagePopup.Visibility = Visibility.Collapsed;
         lbxMessageMyProfileMessagePopup.Visibility = Visibility.Collapsed;
     };
     webBrowser.Navigate(logouturl);
 }
开发者ID:rahulpshephertz,项目名称:Platformer,代码行数:37,代码来源:ScoreBoard.xaml.cs

示例15: button6_Click

        private void button6_Click(object sender, EventArgs e)
        {
            var fb = new FacebookClient();

            var logoutUrl = fb.GetLogoutUrl(new
            {
                next = "https://www.facebook.com/connect/login_success.html",
                access_token = Security.DecryptString(fallyGrab.Properties.Settings.Default.fbToken,Security.encryptionPassw)
            });
            var webBrowser = new WebBrowser();
            webBrowser.Navigated += (o, args) =>
            {
                if (args.Url.AbsoluteUri == "https://www.facebook.com/connect/login_success.html")
                {
                    // update token settings
                    fallyGrab.Properties.Settings.Default.fbToken = "";
                    fallyGrab.Properties.Settings.Default.Save();
                    button5.Visible = true;
                    label23.Visible = false;
                    label24.Visible = false;
                    button6.Visible = false;
                }
            };

            webBrowser.Navigate(logoutUrl.AbsoluteUri);
        }
开发者ID:neamtua,项目名称:fallyGrab,代码行数:26,代码来源:settingsForm.cs


注:本文中的Facebook.FacebookClient.GetLogoutUrl方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。