Twitter sharing (optional)
effect
Twitter Share
Function
objective-c
+ (Void) shareWithContentText :( NSString *)contentText ImageArr :( NSArray <UIImage *>*)imageArr complete :( TwitterStartCompletion)GDCallBack;Parameter
| Parameter name | Nullable (Yes/No) | explain |
|---|---|---|
| Contenttext | Yes | Share the text content, only share the picture can pass nil. |
| imageArr | Yes | The shared image content is passed as an array of parameters, and nil can be passed when only sharing text content. |
Correction
| Parameter name | explain |
|---|---|
| result | Share the results,result[@"code"]When the Value of is 100, the sharing is successful. |
| error | Error 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
}
}];