Facebook SDK Graph API 在墙上发布消息

Facebook SDK Graph API posting message on the wall

我的 Facebook 应用程序的状态和评论反馈建议不要在墙上发帖时预填文本。但是我可以在 Facebook Graph API 文档 Graph API Publishing section 中找到 message 参数的用法。

Bundle params = new Bundle();
params.putString("message", "This is a test message");
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/me/feed",
    params,
    HttpMethod.POST,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();


我已经验证过它并且工作正常。根据更新后的 Facebook 政策是否允许?

消息必须 100% 由用户生成,因此如果您提供一个(空的!)输入字段,用户可以在您执行 API 调用之前输入消息,就可以了。预填是指您预填消息或输入字段,这是不允许的。

https://developers.facebook.com/docs/apps/review/prefill