Defines a type that can process Facebook NSErrors with best practices.
Facebook NSErrors can contain FBSDKErrorRecoveryAttempting instances to recover from errors, or localized messages to present to the user. This class will process the instances as follows:
By default, FBSDKGraphRequests use this type to process errors and retry the request upon a successful recovery.
Note that Facebook recovery attempters can present UI or even cause app switches (such as to login). Any such work is dispatched to the main thread (therefore your request handlers may then run on the main thread).
Login recovery requires FBSDKLoginKit. Login will use FBSDKLoginBehaviorNative and will prompt the user
for all permissions last granted. If any are declined on the new request, the recovery is not successful but
the [FBSDKAccessToken currentAccessToken]
might still have been updated.
.
Inherits from: | NSObject |
Declared in: | FBSDKGraphErrorRecoveryProcessor.h |
delegate
Gets the delegate. Note this is a strong reference, and is nil'ed out after recovery is complete.
@property (nonatomic,
strong,
readonly) id<FBSDKGraphErrorRecoveryProcessorDelegate>delegate;
FBSDKGraphErrorRecoveryProcessor.h
didPresentErrorWithRecovery:contextInfo:
The callback for FBSDKErrorRecoveryAttempting
Parâmetro | Descrição |
---|---|
didRecover | If the recovery succeeded |
contextInfo | Unused |
- (void)
didPresentErrorWithRecovery: | (BOOL)didRecover |
contextInfo: | (void*)contextInfo; |
FBSDKGraphErrorRecoveryProcessor.h
processError:request:delegate:
Attempts to process the error, return YES if the error can be processed.
Parâmetro | Descrição |
---|---|
error | The error to process. |
request | The relateed request that may be reissued. |
delegate | The delegate that will be retained until recovery is complete. |
- (BOOL)
processError: | (NSError *)error |
request: | (FBSDKGraphRequest *)request |
delegate: | (id<FBSDKGraphErrorRecoveryProcessorDelegate>)delegate; |
FBSDKGraphErrorRecoveryProcessor.h