In what situation are Facebook IOS methods called FBSessionDelegate called?

It’s clear to me that they are called at login if the user grants or denies permission:

- (void)fbDidLogin;
- (void)fbDidNotLogin:(BOOL)cancelled;

But I was wondering when the following FBSessionDelegate methods can be called:

- (void)fbDidExtendToken:(NSString*)accessToken expiresAt:(NSDate*)expiresAt;
- (void)fbDidLogout;
- (void)fbSessionInvalidated;

The documentation says:

//Called after the access token was extended.
- (void)fbDidExtendToken:(NSString*)accessToken expiresAt:(NSDate*)expiresAt;

//Called when the user logged out. 
- (void)fbDidLogout;

//Called when the current session has expired.
- (void)fbSessionInvalidated;

Now, when will this happen? When do I call the following?

[Facebook authorize:nil];

Is there no chance that I will return to the correct fbDidLogout call?

Maybe if a user deletes my application from his Facebook account through the Facebook application, will this method be called, by what? No, because my application does not open in this case.

... so in what situation will they be called?

+3
source share
1 answer

I think I found it myself ...

This:

- (void)fbDidExtendToken:(NSString*)accessToken expiresAt:(NSDate*)expiresAt;

, :

[facebook extendAccessTokenIfNeeded];

:

- (void) fbDidLogout;

,

[facebook logout] //(of course..)

:

- (void)fbSessionInvalidated;

, HTTP- Facebook .

SDK Facebook.m

, :)

+5

All Articles