3

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

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?

here's my 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.

4

1 回答 1

8

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.

I hope this helps you out.

EDIT

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.

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."

source

于 2012-07-06T14:19:39.760 回答