尝试直接发布到应用程序的墙上 [英] Trying to post directly to an application's wall

查看:125
本文介绍了尝试直接发布到应用程序的墙上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试直接发布到应用程序的墙上,而不将其链接到我的帐户.我不断收到((OAuthException)(#200)用户未授予应用程序自动发布提要故事的权限".这是来自winform应用程序.

I'm trying to post directly to an application's wall without linking it to my account. I keep getting a "(OAuthException) (#200) The user has not granted the application the permission to automatically publish feed stories". This is from a winform application.

        var oAuthClient = new FacebookOAuthClient();
        oAuthClient.AppId = "APP_ID";
        oAuthClient.AppSecret = "APP_SECRET";
        dynamic token = oAuthClient.GetApplicationAccessToken();

        var appToken = token.access_token;

        FacebookClient fbClient = new FacebookClient(appToken.ToString());
        var args = new Dictionary<string, object>();
        args["message"] = "Testing 123456789 from C#";
        fbClient.Post("/APP_ID/feed", args);

推荐答案

从Facebook文档中引用stream.publish:

Citing from facebook docs for stream.publish:

发布到应用程序的配置文件页面
Posting to Your Application's Profile Page

为了使用stream.publish张贴在应用程序配置文件页面(您的应用程序的关于"页面)的墙上,必须满足以下所有条件:

In order to use stream.publish to post on the Wall of your application profile page (your application's About Page), all the following conditions must be true:

  • 发布用户需要向应用程序授予publish_stream扩展权限.
  • 发布用户必须喜欢应用程序的个人资料页面.
  • 应用程序的开发人员必须编辑应用程序配置文件页面的墙设置"(编辑应用程序">编辑"),并在发布能力"下确认已确认粉丝可以在墙上书写或张贴内容.
  • The posting user needs to grant the application the publish_stream extended permission.
  • The posting user must like the application's profile page.
  • A developer of the application must edit the application profile page's Wall Settings (Edit Application > Edit) and verify under Posting Ability that Fans can write or post content on the wall is checked.

由此可见,您无法使用应用程序令牌仅通过喜欢该应用程序的用户令牌将其发布到应用程序墙.

From this it is obvious you cannot post to application wall with application token, only with token of user that likes the app.

这篇关于尝试直接发布到应用程序的墙上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆