使用 WebAuthenticationBroker 的 FeedDialog

FeedDialog using WebAuthenticationBroker

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

为此,您需要将 facebook 发布对话框 url 传递给 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上注册的app id。希望这有帮助。