使用 Facebook Graph API 的 Silverlight OOB(浏览器外)
我正在构建一个浏览器外 Silverlight 应用程序并尝试使用 Facebook Graph API,但我在完成身份验证往返时遇到问题。
我已经完成了他们的桌面应用程序身份验证过程:
http://developers.facebook.com/docs/ authentication/desktop
但我被困在这一步:
- 拦截上面的重定向并从 URI 中读取访问令牌。
我尝试将事件处理程序添加到 WebBrowser 控件的 LoadCompleted 事件中,但 NavigationEventArgs.Uri 始终为 null:
如果我无法从 WebBrowser 获取当前 URI,我该如何从 Facebook 获取访问令牌?
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:
How am I supposed to get an access token from Facebook if I can't get the current URI out of WebBrowser?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
转至此处并从 Codeplex 上的 Facebook C# SDK 获取 silverlight 示例应用程序。
http://facebooksdk.codeplex.com/
获取源代码,您将看到示例。未来几天将发布完整版本,每个示例都可以单独下载。
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.
我已经下载了最新的代码,但无法构建它...它指出:
错误 1 类型“System.Xml.Serialization.IXmlSerialized”是在未引用的程序集中定义的。您必须添加对程序集“System.Xml,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089”的引用。 C:\facebooksdk2\facebooksdk_db7aa5e188e2\Source\Facebook\JsonSerializer.cs 161 31 Facebook-SL4
但我只能添加对版本 2.0.5 的 system.xml 的引用
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