How to detect when the user deletes the Facebook app

advertisements

I'm new to using the Facebook SDK and I wondered how detect when the user deletes the app from his Facebook account. Currently if we delete the app, and we want to post something from my app, I'm getting an error message.


Try this:

[FBSession renewSystemCredentials:^(ACAccountCredentialRenewResult result, NSError *error) {
    if (!error) {
        if (result == ACAccountCredentialRenewResultRejected) {
            NSLog(@"Facebook app deleted");
        }
    }
    else {
        NSLog(@"Error: %@", error);
    }
}];