Facebook authorize not working inside Android Asynctask or Thread

前端 未结 3 756
执念已碎
执念已碎 2021-01-20 00:20

Working with facebook in Android. Sometimes my application is cashing in real time device when I tried to authorize Facebook in Android.not in emulator. I used the Android F

相关标签:
3条回答
  • 2021-01-20 01:00

    I faced the same issue.You must try to put this method in loop

     Looper.prepare();
     new fbwork().execute(facebook);
     Looper.loop();
    
    0 讨论(0)
  • 2021-01-20 01:06

    I'm having this problem too. I couldn't get the AsyncTask code working.

    So I ended up using runOnUiThread. It works on the emulator, but not on the device, I'm using HTC Desire Android SDK 2.2.2. Unfortunately, I can't even login to Facebook using Hackbook (Facebook's sample project).

    Here's code that uses runOnUiThread: Android App Crashes after Sharing using Facebook Dialogs

    0 讨论(0)
  • 2021-01-20 01:07

    Facebook authorize uses methods which access event thread, so you dont need to execute this method into another thread, than event thread.

    If you face issue in execution of this method in normal event thread, specifythat issue.

    0 讨论(0)
提交回复
热议问题