Creating a custom Wall Post with Facebook API on Android.
I'm new to Facebook API on Android, and basically, what I'm trying to do is creating custom wall post for an application I'm developing.
Like when you listen a Shazam a song and you can share the result with your friends.
I believe I've got to create a custom attachment. Here's my code for setting the attachment:

<code>mPostButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
         Bundle myParams = new Bundle();
         String attachment="{\"name\":\"Gran Turismo 5\"," +
           "\"href\":\"http://www.unknown.com/?lang=fr\"," +
           "\"caption\":\"Sony Computer Entertainment\",\"description\":" +
           "\"Une vidéo proposée par Cedemo.\",\"media\":" +
           "[{\"type\":\"image\",\"src\":" +
           "\"http://www.unknown.com/prepicture//thumb_title/15/15061_1.jpg\"," +
           "\"href\":\"http://www.unknown.com/?lang=fr\"}],\"properties\":" +
           "{\"Autre lien\":{\"text\":\"Cedemo\",\"href\":\"http://www.unknown.com\"}}}";
myParams.putString("attachment", URLEncoder.encode(attachment);
mFacebook.dialog(Option.this, "stream.publish",myParams,
                    new SampleDialogListener());
</code>

And then, later on:
<code>
public class SampleDialogListener extends BaseDialogListener {

    public void onComplete(Bundle values) {
        final String postId = values.getString("post_id");
        if (postId != null) {
            Log.d("Facebook-Example", "Dialog Success! post_id=" + postId);
            mAsyncRunner.request(postId,values, new WallPostRequestListener());
        } else {
            Log.d("Facebook-Example", "No wall post made");
        }
    }
    }
</code>
I didn't wrote the attachment String, It's just a test taken from another question made in this forum. Anyway, when I call myAsync.request, my app shows an error message, how am I supposed to pass the attachment to my dialog?
Hope I've been clear enough.

Creating a custom Wall Post with Facebook API on Android.
===

I'm new to Facebook API on Android, and basically, what I'm trying to do is creating custom wall post for an application I'm developing.
Like when you listen a Shazam a song and you can share the result with your friends.
I believe I've got to create a custom attachment. Here's my code for setting the attachment:

<code>mPostButton.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
         Bundle myParams = new Bundle();
         String attachment="{\"name\":\"Gran Turismo 5\"," +
           "\"href\":\"http://www.unknown.com/?lang=fr\"," +
           "\"caption\":\"Sony Computer Entertainment\",\"description\":" +
           "\"Une vidéo proposée par Cedemo.\",\"media\":" +
           "[{\"type\":\"image\",\"src\":" +
           "\"http://www.unknown.com/prepicture//thumb_title/15/15061_1.jpg\"," +
           "\"href\":\"http://www.unknown.com/?lang=fr\"}],\"properties\":" +
           "{\"Autre lien\":{\"text\":\"Cedemo\",\"href\":\"http://www.unknown.com\"}}}";
myParams.putString("attachment", URLEncoder.encode(attachment);
mFacebook.dialog(Option.this, "stream.publish",myParams,
                    new SampleDialogListener());
</code>

And then, later on:
<code>
public class SampleDialogListener extends BaseDialogListener {

    public void onComplete(Bundle values) {
        final String postId = values.getString("post_id");
        if (postId != null) {
            Log.d("Facebook-Example", "Dialog Success! post_id=" + postId);
            mAsyncRunner.request(postId,values, new WallPostRequestListener());
        } else {
            Log.d("Facebook-Example", "No wall post made");
        }
    }
    }
</code>
I didn't wrote the attachment String, It's just a test taken from another question made in this forum. Anyway, when I call myAsync.request, my app shows an error message, how am I supposed to pass the attachment to my dialog?
Hope I've been clear enough.
