Exception when we want to share image and text via Facebook sdk
<p>I have problem that When we want to share a product with its <em>image</em> and <em>text</em> on <em>facebook</em> with the help of <code>facebook sdk</code> (Fb Dialog) then it gives an <strong>error</strong> message as following:</p>

<p><strong>Error Stack:</strong>
*</p>

<pre><code>08-20 12:26:06.002: ERROR/AndroidRuntime(1776): FATAL EXCEPTION: main
08-20 12:26:06.002: ERROR/AndroidRuntime(1776): java.lang.ArrayIndexOutOfBoundsException
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at com.facebook.android.Util.decodeUrl(Util.java:96)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at com.facebook.android.Util.parseUrl(Util.java:115)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at com.facebook.android.FbDialog$FbWebViewClient.shouldOverrideUrlLoading(FbDialog.java:125)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:224)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:349)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at android.os.Looper.loop(Looper.java:123)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at android.app.ActivityThread.main(ActivityThread.java:4627)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at java.lang.reflect.Method.invokeNative(Native Method)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at java.lang.reflect.Method.invoke(Method.java:521)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
08-20 12:26:06.002: ERROR/AndroidRuntime(1776):     at dalvik.system.NativeStart.main(Native Method)*
</code></pre>

<p><strong>The code of Fb Dialog is as follows:</strong></p>

<pre><code>package com.shopzilla.android.listener;

import android.app.Activity;
import android.os.Bundle;
import com.shopzilla.android.client.model.BaseInventoryItem;
import com.shopzilla.android.moretab.SettingActivity;

import com.facebook.android.DialogError;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;

/**
 * A facebook dialog listener.
 *
 * @author Rod Barlow
 * @since 7/21/11
 */
public class FacebookDialogListener implements DialogListener {

    final BaseInventoryItem item;
    final Activity activity;

    public FacebookDialogListener(BaseInventoryItem item, Activity activity) {
        this.item = item;
        this.activity = activity;
    }

    @Override
    public void onComplete(Bundle values) {
        if (values.isEmpty()) {
            //"skip" clicked ?
            return;
        }
        if (!values.containsKey("post_id")) {
            try {
                Bundle parameters = new Bundle();
                parameters.putString("attachment", "{\"name\":\"" + item.getTitle() + "\",\"href\":\"" + item.getUrl() + "\",\"description\":\" \", \"media\":[{\"type\":\"image\",\"src\":\"" + item.getImageUrl() + "\",\"href\":\"" + item.getUrl() + "\"}]}");
                SettingActivity.mFacebook.dialog(activity, "stream.publish", parameters, new FacebookLoginDialogListener());
            } catch (Exception e) {

                System.out.println(e.getMessage());
            }
        }
    }

    @Override
    public void onFacebookError(FacebookError e) {
        System.out.println("Error: " + e.getMessage());
    }

    @Override
    public void onError(DialogError e) {
        System.out.println("Error: " + e.getMessage());
    }

    @Override
    public void onCancel() {
    }

}
</code></pre>

<p>Please Help me out about This problem.</p>
