3

iOS で SLComposeViewController を使用しているときに、ツイートに通常の 140 文字ではなく 108 文字しか表示されないのはなぜですか?

以下のスクリーンショットに示されています...ここに画像の説明を入力

次のコードを使用して、この 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];
    }
}

私は何を間違っていますか?

4

1 に答える 1

3

なぜこれが起こっているのか分かりました。

技術的には、 http://pic.twitter.com/7Fsa2kadf[composeViewController addImage:[UIImage imageNamed:@"twitter_logo.png"]];のように、ツイート内の画像へのリンクを投稿していたので、ツイート内で 32 文字を占めていたことに気づきませんでした。

そのコード行をコメントアウトすると、140 文字になります。

おそらく、アップルは将来のアップデートでリンクを表示するでしょう。

于 2013-06-24T17:01:36.380 に答える