How my app can know when user logout from its Android native Facebook app?

后端 未结 3 1323
名媛妹妹
名媛妹妹 2021-01-06 11:53

How my app can know when user logout from its native Facebook app ?

I am using below code for Logging out from Facebook in my app. And it is working fine.

         


        
3条回答
  •  既然无缘
    2021-01-06 12:28

    Hmmmm... It may be get tricky. I guess the isSessionValid is offline checking from the FB API.

    From your situation, it looks like you still need to have a single call to the FB to check the session is really valid or not. So my suggestion based on your situation is to make simple FB API call such as /me just to check the validity of the session.

    If session is valid, then you manually call the logout API, otherwise, you know that the FB session is either expired/logged out.

    Hope helps :)

提交回复
热议问题