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.

Community
  • 1
  • 1
shem
  • 4,686
  • 2
  • 32
  • 43

1 Answers1

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

  • still not working, you can see in the "try it yourself" section in your link, the post text not changing – shem Jul 06 '12 at 15:06
  • That's what I worried about, thanks a lot! if you want you can edit your original answer and I'll accept it. – shem Jul 10 '12 at 07:05
  • That's correct, it is ignored as of 12 July 2011 and I would advice you to use the "description" tag for what ever message you would like to share. [source](https://developers.facebook.com/blog/post/510/) – Albert Van de Kamp Jul 10 '12 at 07:07
  • I hope I've been able to help out! – Albert Van de Kamp Jul 10 '12 at 07:15
  • Thank you so much for this answer! It took me forever to figure out that you have to include **all** of the parameters for any of them to work! – Steph Dec 05 '12 at 20:01