title: Error when passing facebook value: gson.JsonPrimitive can not be cast to gson.JsonObject
body: <p>I got this error when I parsed the <strong>Facebook Json</strong> from my Login.java to other activity:</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: com.google.gson.JsonPrimitive cannot be
    cast to com.google.gson.JsonObject</p>
  </blockquote>
  
  <p>When trying to do this: (AnotherActivity.java)</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.profile);
  
          callbackManager = CallbackManager.Factory.create();
          String token;
          token = getIntent().getExtras().getString("token");
  
          pref.getPref(PREF_IS_LOGIN);
          System.out.println("pref : " +pref.getPref(PREF_IS_LOGIN)); //res = 1
          System.out.println("token : " +token); //result = FB user token
      try {
          Gson gson = new Gson();
          jsonObject = gson.fromJson(token, JsonObject.class); //error at this
          String name = jsonObject.get("name").getAsString();
          Log.d("Root Activity", "Result:" + name);
      }catch (Exception e){
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I am using <strong>facebook SDK 4.X.</strong> for Android. It seems it doesn't want to be converted into <strong>google Json</strong>. Anyone know how to solve this case? Thank you.</p>