Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing facebook.authorize with the Android SDK does not call onActivityResult
    primarykey
    data
    text
    <p>I'm trying to call the Facebook authorization from my Android activity, but for some reason it never calls the onActivityResult as it should.</p> <p>I followed the <a href="https://developers.facebook.com/docs/mobile/android/build/" rel="nofollow">official tutorial</a>, and I even created a very simple application just in order to try this functionality:</p> <pre><code>public class SimpleFacebookActivity extends Activity { private EditText console; private Facebook facebook = new Facebook(APP_ID); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.console = (EditText)super.findViewById(R.id.console); this.console.append("Started\n\n"); String text = Integer.toString(super.getIntent().getFlags() &amp; Intent.FLAG_ACTIVITY_NO_HISTORY); this.console.append(text); this.facebook.authorize(this, new DialogListener() { @Override public void onComplete(Bundle values) {} @Override public void onFacebookError(FacebookError error) {} @Override public void onError(DialogError e) {} @Override public void onCancel() {} }); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { this.console.append("onActivityResult, request code: " + requestCode + "\n\n"); super.onActivityResult(requestCode, resultCode, data); this.facebook.authorizeCallback(requestCode, resultCode, data); } } </code></pre> <p>I added a TextEdit widget to which I log, and when I run this application all I get is:</p> <pre><code>Started 0 </code></pre> <p>I checked to see if the FLAG_ACTIVITY_NO_HISTORY is set since they mention it in the tutorial and in another post I saw here on Stack&nbsp;Overflow, but in my case it's not set and so can't be the problem.</p> <p>How can I fix this problem?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    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