0

文字数の上限に達したら、URL をツイートできません。

140文字までは問題なく動作します。

130文字から、リンクを書き始めるとメッセージが

Link will appear shortened

しかし、私はクリックできませんTweet Button。代わりに、画面の上部にメッセージが表示されます

Your Tweet was over 140 characters. You'll have to be more clever

私はすでにこのリンクをチェックしました

ありがとう

4

1 に答える 1

4
- (void)postOnTwitter
{
    //  You can take url with any length....
    NSString *shareLink = @"https://www.google.co.in/"
    //   text should be under 140 character size
    //   TEXT MUST BE END WITH "." dot.
    NSString *text = @"Heyyy... I am sharing Url with any length."
    NSString *tweetStr = [NSString stringWithFormat:@"%@ %@",text, shareLink];

    NSMutableDictionary *message = [[NSMutableDictionary alloc] initWithObjectsAndKeys:tweetStr,@"status", nil];

    NSURLRequest* request = [[[Twitter sharedInstance] APIClient] URLRequestWithMethod:@"POST" URL:@"https://api.twitter.com/1.1/statuses/update.json" parameters:message error:nil];

    [[[Twitter sharedInstance] APIClient] sendTwitterRequest:request     completion:^(NSURLResponse* response, NSData* data, NSError* error){
        if(!error)
        {
            //    Post successfully 
        }
        else if(error)
       {
            //   Check for Error
        }
    }];
}
于 2016-04-12T12:38:50.373 に答える