无法提供PARAMS向Facebook发布对话框 [英] Not able to supply params to Facebook post dialog

查看:132
本文介绍了无法提供PARAMS向Facebook发布对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下code至pre-填充后对话框。但我发现了一个空DialogBox的,不过:

I am using following code to pre-populate the post dialog. But I'm getting a empty dialogbox, nevertheless:

        Bundle parameters = new Bundle();
        parameters.putString("app_id", appID);
        parameters.putString("name", "Facebook Dialog");
        parameters.putString("caption", "Reference Documentation");

        parameters.putString("message", "Facebook Dialogs are easy!");

        facebook.dialog(score.this, "feed", parameters, new DialogListener() {

            @Override
            public void onComplete(Bundle values) {
            }

            @Override
            public void onFacebookError(FacebookError error) {
            }

            @Override
            public void onError(DialogError e) {
            }

            @Override
            public void onCancel() {
            }
        });

不过,如果有可能,我想没有任何对话可言,并直接邮寄到用户墙上。

However, if it is possible, I would like no dialog at all and directly post to the users wall.

推荐答案

我不开发Android,但我知道的Facebook作出处理变化的的消息参数在可能会导致您的问题饲料对话框。

I don't develop for Android, but I know Facebook made a change in handling of the message parameter in the feed dialog that might be causing your problem.

一直以来对政策pre-填充的消息参数。它必须是用户生成的。在过去几个月的某一点停止的Facebook甚至接受它在饲料对话框,什么可能导致你的问题中使用。现在唯一的方式,你可以作为一个参数是发布到通过图形API的饲料通过。当然,你还需要确保遵守政策,您的应用程序设计,使用户填写信息 - 它不能是一个应用程序生成的字符串

It has always been against policy to pre-populate the message parameter. It must be user-generated. At some point in the last couple of months Facebook stopped even accepting it for use in the Feed dialog, which is what might be causing your problem. Now the only way you can pass it as a parameter is by posting to the feed via the graph API. Of course you still need to be sure to comply with policy in your app design and make the user populate the message -- it cannot be an app-generated string.

所以,因为你甚至不希望的对话框中,你真的应该考虑通过图形API发布。您将需要获得publish_stream扩展权限,然后执行POST到用户的饲料。见<一href=\"https://developers.facebook.com/docs/reference/api/post/\">https://developers.facebook.com/docs/reference/api/post/

So, since you don't even want the dialog, you should really look into posting via the graph API. You will need to obtain the publish_stream extended permission and then perform a POST to the user's feed. See https://developers.facebook.com/docs/reference/api/post/

这篇关于无法提供PARAMS向Facebook发布对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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