Desktop Authentication Problem Solved!

Jul 6, 2010 at 6:18 AM
Hello fellow FB developers and developers of the FB Toolkit. In a previous post I mentioned the inability for the toolkit to authenticate in a desktop application using the new OAuth authentication due to the '#access_token=' string not getting passed to the web browser control that exists as part of the FacebookService component. I tried many ways to authenticate; using my own WebBrowser control and HttpWebRequests both posting and getting from the FB servers. No luck... Now, I see that you are using the WPF browser control for authentication, but this doesn't seem to have a DocumentCompleted event, so switching back to the WinForms control you are able to assign a handler to this event and... void browser_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { var uri = e.Url; } The uri variable will have the complete Url, including everything after the #; handling the Navigated event does not provide this. I hope this helps somebody out there - I am certainly happy that I have discovered this and am able to authenticate from my desktop app! Now onto the next thing... Jono
Sep 10, 2010 at 11:47 PM

I'm writing .NET API for Russian social network and I have same issue with WPF browser control.

I wrote to

Using WinForms is a workaround, but I don't understand how make desktop authentication work in Windows Phone 7. WebBrowser in Phone 7 "eats" all after # (including #)