문제

I'm building an out of browser Silverlight app and trying to use the Facebook Graph API, but I'm having trouble getting through the authentication round trip.

I've gone through their Desktop Application Authentication process:

http://developers.facebook.com/docs/authentication/desktop

But I'm stuck on this step:

  • Intercept the redirect above and read the access token out of the URI.

I've tried adding an event handler to the LoadCompleted event of my WebBrowser control, but NavigationEventArgs.Uri is always null:

http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.loadcompleted(v=VS.96).aspx

How am I supposed to get an access token from Facebook if I can't get the current URI out of WebBrowser?

도움이 되었습니까?

해결책

Go here and get the silverlight sample app from the Facebook C# SDK on Codeplex.

http://facebooksdk.codeplex.com/

Get the source and you will see the samples. There will be a full release in the next few days with separate downloads for each sample.

다른 팁

I have downloaded the latest code but i can't build it... it's stating:

Error 1 The type 'System.Xml.Serialization.IXmlSerializable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\facebooksdk2\facebooksdk_db7aa5e188e2\Source\Facebook\JsonSerializer.cs 161 31 Facebook-SL4

but i can only add a reference to system.xml of version 2.0.5

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top