FBSession checkThreadAffinity

I used facebook authentication via facebook sdk. If fbaccount is available, then it works fine, but in the absence of fbaccount it fails with this error:

FBSession checkThreadAffinity

I use this code for the auth process

Please check what I am doing wrong in the above code.

+4
source share
1 answer

I had the same problem. The problem was that I tried to call the om methods from the static method [FBSession activeSession] or any FBSession from another thread. I came to the conclusion that the FBSession object FBSession not thread safe.

I can not find any problems in your code. However, check when you first call the FBSession object, is it called from the main thread? If this is not the case, this may be the reason.

+1
source

Source: https://habr.com/ru/post/1486978/


All Articles