Changes

no edit summary
As discussed in [[Integrating Twitter into iPhone iOS 5 Applications the iOS 5 TWTeetComposeViewController TWTweetComposeViewController class]] makes the integration of Twitter into iOS applications so easy that it can actually be harder to decide whether or not to integrate Twitter than to actually perform the integration.
Within this chapter an example application will be developed that demonstrates the steps necessary to implement Twitter functionality in an iOS 5 iPhone application using the TWTeetComposeViewController TWTweetComposeViewController class.
== iPhone Twitter Application Overview ==
In the course of this chapter an iPhone application will be created that will allow the user to enter a Twitter text message, specify a URL and attach an image from the device’s camera roll and then send the message via Twitter using the TWTeetComposeViewController TWTweetComposeViewController class.
== Creating the TwitterApp Project ==
</pre>
Finally, the code to configure and display the TWTeetComposeViewController TWTweetComposeViewController user interface needs to be implemented in the form of the previewTweet: method:
<pre>
</pre>
This method constructs an NSURL object from the URL string contained in text field and then assigns the text from the text view, the URL and the image in the image view to the TWTeetComposeViewController TWTweetComposeViewController instance before displaying the compose view to the user.
== Releasing Memory ==
== Building and Running the Application ==
Since the camera roll on the iOS Simulator does not contain any images, in order to fully realize the capabilities of the application it will be necessary to install it on a physical iPhone device (details of which are provided in [[Testing iOS 5 Apps on the iPhone – Developer Certificates and Provisioning Profiles]]). Having provisioned, attached and selected a device, click on the Run button in the Xcode toolbar to compile and launch the application. Once running, enter a message into the text view, a URL into the text field and choose an image from the camera roll. Finally, touch the Preview Tweet button to display the TWTeetComposeViewController TWTweetComposeViewController screen. If a twitter account has not previously been added to the device, follow the steps to add one, send the message and then check your Twitter account where the message should be listed after a short delay.