将内容添加到Facebook的饲料对话框,新的Facebook SDK为Android [英] Adding content to Facebook feed dialog with new Facebook SDK for Android

查看:100
本文介绍了将内容添加到Facebook的饲料对话框,新的Facebook SDK为Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道到<一个href=\"http://stackoverflow.com/questions/4450517/adding-content-to-facebook-feed-dialog-from-facebook-sdk-for-android\">this螺纹,带我的同样的问题。

I'm aware to this thread, with same question as my.

但它在一个评论说,改变there- API来这一个和消息属性现在被忽略。有没有一种方法来设置文本框的内容与新的API?

but as it says in one of the comments there- API was changed to this one and the "message" attribute is now ignored. is there a way to set the text box content with the new API?

这是我的code:

protected void post() {
    Bundle params = new Bundle();
    params.putString("message", "my message here");
    facebook.dialog(this, "feed", params, new DialogListener() {
        @Override
        public void onFacebookError(FacebookError e) {
        }

        @Override
        public void onError(DialogError e) {
        }

        @Override
        public void onComplete(Bundle values) {
        }

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

THX。

推荐答案

我一直在寻找这个也和我想我已经找到了解决办法。可悲的是这个文件是iOS和可以在这里找到 ;

I have been looking about this as well and I think I have found the solution. Sadly enough the documentation for this was for iOs and can be found here;

Bundle params = new Bundle();

params.putString("link", "your app url here");
params.putString("picture", "your img url here");
params.putString("name", "your post title");
params.putString("caption", "your subtitle");
params.putString("description", "your message");

facebook.dialog(Your Context, "feed", params, Your DialogListener);

不要试图只使用一个参数,你必须使用它们,使其工作。

Don't try to use just one parameter, you have to use them all to make it work.

我希望这可以帮助你。

修改

邮件标签2011年7月忽略,12我会建议你使用你想分享什么都消息的说明标签。

The message tag is ignored as of 12 July 2011 I would advice you to use the "description" tag for what ever message you would like to share.

这是从Facebook对消息参数报价:
7月12日,我们忽略了在饲料对话框消息参数,从而消除能力pre-填充流的故事(通过政策禁止IV.2)。这一变化鼓励用户分享真实和相关的内容与他们的朋友。

This is the quote from Facebook about the "message" parameter: "On July 12, we are ignoring the message parameter in Feed Dialogs. This eliminates the ability to pre-fill stream stories (prohibited by Policy IV.2). This change encourages users to share authentic and relevant content with their friends."

这篇关于将内容添加到Facebook的饲料对话框,新的Facebook SDK为Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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