Skip to content

Twitter sharing (optional) ​

effect ​

Twitter Share

Function ​

objective-c
+ (Void) shareWithContentText :( NSString *)contentText ImageArr :( NSArray <UIImage *>*)imageArr complete :( TwitterStartCompletion)GDCallBack;

Parameter ​

Parameter nameNullable (Yes/No)explain
ContenttextYesShare the text content, only share the picture can pass nil.
imageArrYesThe shared image content is passed as an array of parameters, and nil can be passed when only sharing text content.

Correction ​

Parameter nameexplain
resultShare the results,result&#91;@"code"]When the Value of is 100, the sharing is successful.
errorError message, no error message in case of successful sharing

Example code ​

objective-c
[GDTwitterShare shareWithContentText:@ "shared text content" ImageArr:@ [shared image array] complete:^(id_nonnull result, NSError *_nullable error) {
If (error) {
// Failed to share,The error message is
NSString *message = error.domain;
DEBUG_LOG(error);
}else{
// Share success
}
}];