I need to access some web api from my desktop application for authentication. For example, facebook api, it requires to redirect to facebook page for allow permission from user and then it redirect back along with an access token which is needed for accessing private data. Now, on facebook documentation they alreasy metioned that, webbrowser class of .NET framework can help in this case. THere are two webbrowser class, one for wpf application, at msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.aspx, another is for windows forms application, at msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx
Now, My question is, how can i use this to make a broser like popup of the url and after it back , retrieve the url again.
Regards
Well, I will list the steps for you, and it’s easier that you may think:
Formthat will be used to house theWebBrowsercontrol and style it to look like a popup.Navigate()method on the WebBrowser to go to the needed URLUrlproperty on the WebBrowser and get the token (Hint: you can use theNavigatedevent to determine when the page is (re)loading.)