facebook, android java.lang.IllegalStateException: Cannot execute task: the task is already running

前端 未结 2 1693
忘掉有多难
忘掉有多难 2021-01-05 01:12

After login I can I can make FB queries. After few minutes (played game) Facebook requests fail exception:

java.lang.IllegalStateException: Cannot execute ta         


        
相关标签:
2条回答
  • 2021-01-05 02:00

    You can use Request.toHttpConnection(request) instead of request.executeAsync()

    0 讨论(0)
  • 2021-01-05 02:09

    Are you running on UI thread? Wrap your code withrunOnUiThread

    like this

    Facebook SDK mentions that async calls must be done from UI thread

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