- (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
}
}];
}