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

  • Home
  • SEARCH
  • 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 7769303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:07:35+00:00 2026-06-01T16:07:35+00:00

I followed the method to post facebook status updates without their dialog box from

  • 0

I followed the method to post facebook status updates without their dialog box from this answer on SO: https://stackoverflow.com/a/7528388/450534

I can post status updates from the apps activity, but it is still generating warnings.

Its a mighty long list of warnings from the DDMS. Any advise on fixing the problem is appreciated.

The code:

protected void postToWall(String message) {

        if (!Utility.mFacebook.isSessionValid()) {
            Util.showAlert(this, "Warning", "You must first log in.");
        }

        Log.d("Tests", "Testing graph API wall post");
        try {
            String response = Utility.mFacebook.request("me");
            Bundle parameters = new Bundle();
            parameters.putString("message", txtPostToWall.getText().toString());
//          parameters.putString("description", getString(R.string.app_desc));

            response = Utility.mFacebook.request("me/feed", parameters, "POST");
            txtPostToWall.setText("");
            this.finish();

            Log.d("Tests", "got response: " + response);

            if (response == null || response.equals("") ||  response.equals("false"))   {
                Log.v("Error", "Blank response");
            }
        }
        catch(Exception e)  {
            e.printStackTrace();
        }
    }

The DDMS warnings: (Very very lengthy.)

03-30 20:02:53.290: W/Bundle(17941): Key message expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.306: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.306: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.306: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.306: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:161)
    03-30 20:02:53.306: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.306: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.306: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.306: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.306: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.306: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.306: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.306: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.306: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.306: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.306: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.306: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.306: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.306: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.310: W/Bundle(17941): Key access_token expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.325: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.325: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.325: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.325: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:161)
    03-30 20:02:53.325: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.325: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.325: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.325: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.325: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.325: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.325: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.325: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.325: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.325: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.325: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.325: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.325: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.325: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.325: W/Bundle(17941): Key format expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.341: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.341: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.341: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.341: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:161)
    03-30 20:02:53.341: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.341: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.341: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.341: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.341: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.341: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.341: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.341: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.341: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.341: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.341: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.341: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.341: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.341: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.353: W/Bundle(17941): Key message expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.368: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.368: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.368: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.368: W/Bundle(17941):    at com.facebook.android.Util.encodePostBody(Util.java:69)
    03-30 20:02:53.368: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:188)
    03-30 20:02:53.368: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.368: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.368: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.368: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.368: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.368: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.368: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.368: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.368: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.368: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.368: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.368: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.368: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.368: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.368: W/Bundle(17941): Key method expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.384: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.384: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.384: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.384: W/Bundle(17941):    at com.facebook.android.Util.encodePostBody(Util.java:69)
    03-30 20:02:53.384: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:188)
    03-30 20:02:53.384: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.384: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.384: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.384: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.384: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.384: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.384: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.384: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.384: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.384: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.384: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.384: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.384: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.384: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.388: W/Bundle(17941): Key access_token expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.403: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.403: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.403: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.403: W/Bundle(17941):    at com.facebook.android.Util.encodePostBody(Util.java:69)
    03-30 20:02:53.403: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:188)
    03-30 20:02:53.403: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.403: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.403: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.403: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.403: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.403: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.403: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.403: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.403: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.403: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.403: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.403: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.403: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.403: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)
    03-30 20:02:53.403: W/Bundle(17941): Key format expected byte[] but value was a java.lang.String.  The default value <null> was returned.
    03-30 20:02:53.423: W/Bundle(17941): Attempt to cast generated internal exception:
    03-30 20:02:53.423: W/Bundle(17941): java.lang.ClassCastException: java.lang.String
    03-30 20:02:53.423: W/Bundle(17941):    at android.os.Bundle.getByteArray(Bundle.java:1305)
    03-30 20:02:53.423: W/Bundle(17941):    at com.facebook.android.Util.encodePostBody(Util.java:69)
    03-30 20:02:53.423: W/Bundle(17941):    at com.facebook.android.Util.openUrl(Util.java:188)
    03-30 20:02:53.423: W/Bundle(17941):    at com.facebook.android.Facebook.request(Facebook.java:751)
    03-30 20:02:53.423: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate.postToWall(StatusUpdate.java:68)
    03-30 20:02:53.423: W/Bundle(17941):    at com.dzinesunlimited.sociallyyou.StatusUpdate$2.onClick(StatusUpdate.java:48)
    03-30 20:02:53.423: W/Bundle(17941):    at android.view.View.performClick(View.java:2538)
    03-30 20:02:53.423: W/Bundle(17941):    at android.view.View$PerformClick.run(View.java:9152)
    03-30 20:02:53.423: W/Bundle(17941):    at android.os.Handler.handleCallback(Handler.java:587)
    03-30 20:02:53.423: W/Bundle(17941):    at android.os.Handler.dispatchMessage(Handler.java:92)
    03-30 20:02:53.423: W/Bundle(17941):    at android.os.Looper.loop(Looper.java:130)
    03-30 20:02:53.423: W/Bundle(17941):    at android.app.ActivityThread.main(ActivityThread.java:3687)
    03-30 20:02:53.423: W/Bundle(17941):    at java.lang.reflect.Method.invokeNative(Native Method)
    03-30 20:02:53.423: W/Bundle(17941):    at java.lang.reflect.Method.invoke(Method.java:507)
    03-30 20:02:53.423: W/Bundle(17941):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
    03-30 20:02:53.423: W/Bundle(17941):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
    03-30 20:02:53.423: W/Bundle(17941):    at dalvik.system.NativeStart.main(Native Method)

Any help is really appreciated.

  • 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-06-01T16:07:37+00:00Added an answer on June 1, 2026 at 4:07 pm

    Well well well. I feel like a total moron for having ignored the important warnings….. 🙁

    The trick was to change the Util.java in the Facebook SDK at line 69 from:

    if (parameters.getByteArray(key) != null) {
    

    to:

    if (parameters.get(key) instanceof byte[]) {
    

    Thanks to the solution posted here: https://stackoverflow.com/a/3927541/450534

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

Sidebar

Related Questions

I have followed the Accepted Answer's instructions from this post as regards creating a
I've followed this tutorial: https://developers.facebook.com/docs/opengraph/tutorial/ multiple times and always get the same result. I
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I followed the directions in this post: how can we integrate jquery autocomplete using
I hate starting a post with this but I'm new to Java... I've followed
I was just reading this post When is IHttpModule.Dispose method called? I found this
I followed the wiki post to add username as another authentication method for Devise..
I want get from a method ruby true if every posts are followed for
I followed these two exemples of developer.android (Creating an Input Method, Soft Keyboard sample).
I've followed a tutorial and came up with the following method to read the

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.