当您在 iOS 上使用 SLComposeViewController 时,为什么您的推文只能获得 108 个字符而不是通常的 140 个字符?
如下图所示...
我正在使用以下代码创建此 SLComposeViewController ...
- (IBAction)compose:(id)sender {
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) {
SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
[composeViewController addImage:[UIImage imageNamed:@"twitter_logo.png"]];
[composeViewController setCompletionHandler:^(SLComposeViewControllerResult result) {
if (result == SLComposeViewControllerResultDone) {
UIAlertView *success = [[UIAlertView alloc] initWithTitle:@"Success" message:@"Your tweet was successfully posted!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[success show];
}
else {
[self dismissViewControllerAnimated:YES completion:nil];
}
}];
[self presentViewController:composeViewController animated:YES completion:nil];
} else {
UIAlertView *error = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Error" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[error show];
}
}
我究竟做错了什么?