1. Twitter Integration

    With more than 3000 apps integrated with Twitter, is not really a big surprose to learn that iOS 5 adds APIs to make things even easier.

    If all we need to to allow users to push tweets from our apps, then it is really easy. All we need to do is to link the ´Twitter.framework´ and then import Twitter/TWTweetComposeViewController.h where we need it. TWTweetComposeViewController is basically a modal view that supports user interactions to compose a tweet. One important method is the class method canSendTweet that returns either YESor NOdepending on whether the device can send a tweet. The rest is really simply, alloc and init and instance of TWTweetComposeViewControllerset a completion handler, and if appropriate, add some initial content like a URL, some text or images.

    Here some code to play around.

Notes

  1. volonbolon posted this