Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid facebook authorization: onActivityResult not called
    primarykey
    data
    text
    <p>I build an android app connect with facebook, which has a button. When I click the button, the app will call facebook.authorize to ask permission. After return from the ask permission screen, it should call onActivityResult method. But in my case, it never call this method. I found some similar question but all the solutions don't solve my case. Here's my code when user click the button:</p> <pre><code>facebook.authorize(this, new String[] { "read_friendlists" }, new DialogListener() { public void onComplete(Bundle values) { Log.v("complete", "complete"); hideNeedLoginView(); } public void onCancel() { Log.v("cancel", "cancel"); hideNeedLoginView(); } public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub Log.v("error", "error"); } public void onError(DialogError e) { // TODO Auto-generated method stub Log.v("error", "error"); } }); </code></pre> <p>And onActivityResult method:</p> <pre><code>public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); facebook.authorizeCallback(requestCode, resultCode, data); } </code></pre> <p>Since the onActivityResult not called, all the onComplete or onCancel method don't called either. The Intent.FLAG_ACTIVITY_NO_HISTORY is not defined so that's not the problem(this is mention on facebook page). If I set the activityCode to Facebook.FORCE_DIALOG_AUTH then when I clicked the button, the app not responding. And I have facebook app installed on the device. What should I do to call the onActivityResult method after authorize? Please someone help me with this since I can't find any solution anywhere.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload