0
votes

I am working on facebook application and I wanted to logout from the facebook application so I am usgin https://www.facebook.com/logout.php? but it will not log out and reload to the facebook.com so I am using WebBrowser. my code look like.

string LogoutUri = "https://www.facebook.com/logout.php?";
               if (uri!=null)
                {
                    if (uri.Contains("https://www.facebook.com/logout.php?"))
                    {
                        browser.Focus();
                        browser.Navigate(new Uri(LogoutUri, UriKind.RelativeOrAbsolute));
                    } 
                }

I am using WPF C# for facebook application.

Thank you..!!

1
so you write a WPF-application that should do what? Log you out from FB in every Browser-instance that might happen to run on the users desktop? Or just from your own application? - Random Dev
it's on my application I have to logout from to the my FB application but it will not working properly so do you have any idea why it is.? - Jitendra Jadav
without seeing your code? No no idea! - please improve the question - I really don't know how to help you with this few information - Random Dev
I have added code just take a look.thank you.! - Jitendra Jadav

1 Answers

0
votes

If you are using the WebBrowser control, then find the logout button control using the findhtmlcontrol in the whole webbrowser source code and then invoke the click event for the logout button. Hope this will solve the problem of yours.