Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Use the native Twitter available with the iOS 5 to integrate twitter. On one hand the UI is fabulous and on the other you will not have any problem using SharKit. Though I must tell you ShareKit is the best option for iOS versions below 5.</p> <p>To use native Twitter integration do the following. Add these statements to the your class after including the necessary frameworks</p> <pre><code>#if defined(__IPHONE_5_0) &amp;&amp; __IPHONE_OS_VERSION_MAX_ALLOWED &gt;= __IPHONE_5_0 #import &lt;Twitter/Twitter.h&gt; #import &lt;Accounts/Accounts.h&gt; #endif </code></pre> <p>Please note that when adding the Framework for Twitter and Accounts make sure they are set as optional.</p> <p>And then in you share method use the lines</p> <pre><code>- (void)shareOnTwitter { Class TWTweetComposeViewControllerClass = NSClassFromString(@"TWTweetComposeViewController"); if (TWTweetComposeViewControllerClass != nil) { if([TWTweetComposeViewControllerClass respondsToSelector:@selector(canSendTweet)]) { UIViewController *twitterViewController = [[TWTweetComposeViewControllerClass alloc] init]; [twitterViewController performSelector:@selector(setInitialText:) withObject:twitterText]; [twitterViewController performSelector:@selector(addURL:) withObject:[NSURL URLWithString:url]]; [twitterViewController performSelector:@selector(addImage:) withObject:urImage]; [self presentModalViewController:twitterViewController animated:YES]; [twitterViewController release]; } else { // Use ShareKit for previous versions of iOS } } </code></pre> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload