0

Can someone tell the difference between those states? And when to use which one?

1 Answers1

0

According to the facebook sdk reference page:

SessionState.isOpened()

Returns a boolean indicating whether the state represents a successfully opened state in which the Session can be used with a Request.

and

Session.isOpened()

Returns a boolean indicating whether the session is opened.

Maybe there's no real difference between them, but I recommend to use Session.isOpened() whenever you just want to know if the session is opened and the Session.getState().isOpened() if you need to know if it can be used with a Request.

https://developers.facebook.com/docs/reference/android/current/class/SessionState/ https://developers.facebook.com/docs/reference/android/current/class/Session/

Massita
  • 309
  • 2
  • 10