Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6360113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:36:25+00:00 2026-05-24T23:36:25+00:00

I have problem that When we want to share a product with its image

  • 0

I have problem that When we want to share a product with its image and text on facebook with the help of facebook sdk (Fb Dialog) then it gives an error message as following:

Error Stack:
*

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)*

The code of Fb Dialog is as follows:

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() {
    }

}

Please Help me out about This problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:36:26+00:00Added an answer on May 24, 2026 at 11:36 pm

    This Is Solved by a very easy Code as following:

    In Util.java You must add this Line in a decode method:

    if(v.length == 2)
    {
    param= /*as mentioned previous*/
    }
    

    And Issue Solved.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My problem is that I want to have a tab bar view with its
I have a big problem. I want to extract text from html table that
with my RCP program I have the problem that I want to have more
I have a problem with my site. I want that the shadow stops at
I have problem with fancybox. I want to write a function that will run
I have a class that i want to push_back into a deque. The problem
My problem is simple: I have a long list of elements that I want
I have a single Rails 2.2.2 app that I want to 'share' with multiple
I have a problem similar to IntegerPartitions function, in that I want to list
We have multiple projects in our system that want to share the same asmx

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.