使用WebAuthenticationBroker

时间:2015-12-01 08:50:58

标签: c# facebook windows-phone-8.1 windows-store-apps

我正在开发一个商店应用程序,我需要在用户的个人资料中发布一些消息和图像。使用WebAuthenticationBroker我允许用户登录并返回一个令牌但我想打开Feed对话框。我怎样才能做到这一点?我已经阅读了使用WebAuthenticationBroker在facebook上发布文本,但找不到任何代码。所以我的问题是我需要在WebAuthenticationBroker中传递哪个URL

1 个答案:

答案 0 :(得分:0)

您需要将facebook发布对话框网址传递给webauthenticationbroker。代码应该是这样的。

WebAuthenticationBroker.AuthenticateAndContinue(new Uri("https://www.facebook.com/dialog/feed?app_id=145634995501895&display=popup&caption=An%20example%20caption&link=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https://developers.facebook.com/tools/explorer"))

此处app_id是您在Facebook上注册的应用ID。希望这会有所帮助。