I am implementing Twitter integration in my app. But setintialtext showing empty dialog box.
My code is:
TWTweetComposeViewController *tweetSheet =
[[TWTweetComposeViewController alloc] init];
if ([TWTweetComposeViewController canSendTweet])
{
NSString *tw=[[NSString stringWithFormat:@"AT %@ %@ \n on %@\n %@ %@ %@ vs %@",lbl_vanueName.text,lbl_address.text,[arr_eventDate objectAtIndex:0],[arr_eventName objectAtIndex:0],[arr_EventType objectAtIndex:0],[arr_Contestant1 objectAtIndex:0],[arr_Contestant2 objectAtIndex:0]] retain];
NSLog(@" tw is:%@",tw); // work fine & got all values
[tweetSheet setInitialText:tw];
}
What is the return value of the
setInitialTextmethod. If you check the docs forTWTweetComposeViewController, there is a comment:Return Value
YES if successful. NO if text does not fit in the currently available character space or the view was presented to the user.
Maybe the text doesn’t fit?