David David - 1 year ago 66
iOS Question

FBSDKLoginKit, How does one have a callback for when logging out is complete?

So, I've read that logging out is done like this:


Does Facebook make a network call so their server knows the logout took place? If so, how do I hook into the callback. I've read the docs and see that the logOut function calls
[FBSDKAccessToken setCurrentAccessToken:nil]
[FBSDKProfile setCurrentProfile:nil]
. Does that mean it is just client-side and I don't have to show any UIActivityIndicatorView or that I don't even have to do error handling for logging out?

Answer Source

In my point of view, they simply remove the local access token and any cached data. By looking at the comments of the logout method from the sdk file:

 @abstract Logs the user out
 @discussion This calls [FBSDKAccessToken setCurrentAccessToken:nil]
 and [FBSDKProfile setCurrentProfile:nil].
- (void)logOut;

We as a developer-user have to rely on how they provide the api, and from the this method, it looks like its a local job (client-side), no web service involved. So there's no need to show activity indicator or whatsoever.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download