facebook/facebook-android-sdk — Issue #253: java.lang.ClassCastException: java.lang.String
Author: the4thfloor
Created: 2011-11-29 11:10:34+00:00
State: open

I get this exception:

Key format expected byte[] but value was a java.lang.String. The default value was returned.
Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.String
at android.os.Bundle.getByteArray(Bundle.java:1305)
at com.facebook.android.Util.openUrl(Util.java:166)
at com.facebook.android.Facebook.request(Facebook.java:540)
at com.facebook.android.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:246)

to fix it i have changed this lines in Util.java:

166: if (params.getString(key) != null) {
167: dataparams.putByteArray(key, params.getString(key).getBytes());
168: }