Changes

m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_IOS6ios9_upgrade</googlehtmlet>
The iOS 6 operating system running on iPhone and iPad devices is able to store multiple Twitter accounts but only one Facebook account at a time. These are accessible both from the device Settings application in addition to using the Accounts Framework within application code.
To manually view and configure Twitter accounts on a device, select the Settings application and choose the Twitter option. As illustrated in Figure 3 70-1, any pre-configured Twitter accounts will be listed together with a button providing the option to add a new Twitter account and switches providing control over which applications may be granted permission to access those Twitter accounts:
[[Image:iphone_ios_5_twitter_settings.jpg|The Twitter settings page of the iOS 6 iPhone Settings App]]
Figure 370-1
The current Facebook account settings on the device may, similarly, be viewed and modified by selecting the Facebook option of the main screen of the Settings application. Options are also provided on the Facebook settings panel to control which applications have access to the Facebook account, and to modify or delete the currently configured Facebook account.
When using the SLRequest class to construct API requests, it will be necessary to use the Accounts framework to identify and request permission to use the corresponding social network accounts in an application. When using the UIActivityViewController or SLComposeViewController, however, the account handling is performed automatically by the class. The remainder of this chapter will focus on the UIActivityViewController and SLComposeViewController classes. The SLRequest class will be covered in detail in the chapter entitled [[iPhone iOS 6 Facebook and Twitter Integration Tutorial using SLRequest]].
== Using the UIActivityViewController Class ==
The UIActivityViewController class is instantiated within an application at the point at which a posting is ready to be made to a social network. Once the user takes an action to post an update from within an application, the screen shown in Figure 370-2 will appear listing the options that are available:
<htmlet>adsdaqbox_flow</htmlet>
[[Image:iPhone_iOS6_social_network_selection.png|The iPhone iOS 6 UIActivityViewController selection screen]]
Figure 370-2
Once a destination social network has been selected, the preview sheet for the chosen service (Figure 370-3 shows the sheet for a Facebook posting) will appear primed with the content of the update to be sent consisting of text and any optional image attachments. Having reviewed and, optionally, modified the post, user may then send the message.
[[Image:iPhone_iOS6_UIActivityViewController_preview.png|The iPhone iOS 6 UIActivityViewController post preview screen]]
Figure 370-3
In the event that the user has not yet configured an account for the selected social network in the Settings application, a dialog will appear providing the option to either set up an account or cancel the post.
<googlehtmlet>BUY_IOS6ios9_upgrade</googlehtmlet>
 
<htmlet>ezoicbottom</htmlet>
<hr>
<table border="0" cellspacing="0" width="100%">