How to Integrate Facebook Login in iOS Apps | iOS Programming

 

facebook integration ios 7 tutorial

I followed facebook developer's tutorial about facebook integration chipshopp.gq But the most of the codes are placed in the. Sep 19,  · Culture Understanding Facebook integration on iOS 6. Apple and Facebook teamed up to bring Facebook integration throughout iOS 6. Here's what you need to chipshopp.gq: Jason Cipriani. Following the Twitter support in iOS 5, Apple added the support of Facebook in iOS 6. In the past, developers have to make use of the Facebook and Twitter API to integrate the sharing feature in their apps. With the built-in support, it’s much easier to add these social features to your own app Author: Simon Ng.


Set Up Facebook, Twitter Integration on Your iOS 6 Device


Learn more With the basics of the Social Framework and UIActivityViewController class covered in the previous chapter, the goal of this chapter will be to create an example application designed to demonstrate the UIActivityViewController class in action.

Begin by launching Xcode and selecting the options to create a new iOS application based on the Single View Application template. Enter SocialApp as the product name and class prefix and set the device to iPhone. Navigate to the Main. Click on the background of the view object and change the background color to a light shade of grey using the Attributes Inspector panel. Drag, position and configure a Text View, Image View and two Buttons on the view canvas so that the user interface reflects that illustrated in Figure Note that the sample Latin text has been removed from the text view object select the object, facebook integration ios 7 tutorial, display the Attributes Inspector and delete the contents assigned to the Text property.

This will ensure that the aspect ratio of the image is preserved when displayed in the image view. The next step is to constrain the size of the image view object so that it does not grow to accommodate the size of the selected image.

With the image view selected in the storyboard facebook integration ios 7 tutorial, click on the Pin button in the toolbar at the bottom of the storyboard panel to display the Add New Constraints panel. Within the panel, facebook integration ios 7 tutorial, enable the check boxes next to the Width and Height constraints Figure to constrain the image view to its current dimensions:.

In order to create the outlets and actions for the application we will, as always, make use of the Assistant Editor. Alternatively, it may also be displayed by selecting the center button the one containing an image of a bow tie and tuxedo of the row of Editor toolbar buttons in the top right hand corner of the main Xcode window, facebook integration ios 7 tutorial. Make sure that the SocialAppViewController.

Upon releasing the line, the configuration panel will appear. Configure the connection as an Outlet named postText and click on the Connect button. Facebook integration ios 7 tutorial the above steps to add an outlet for the Image View object named postImage.

The application will require three actions. One for each of the button objects and one for the background view that will be used to hide the keyboard when the user has finished entering text.

Ctrl-click on the Select Image button and drag the resulting line to a position beneath the new outlets previously declared in facebook integration ios 7 tutorial Assistant Editor. In the resulting configuration panel, change the Connection type to Action and name the method selectImage. Repeat this step to add an action for the Post Message button, this time naming the action sendPost. Once the connections have been established, select the SocialAppViewController. The purpose of the selectImage action method is to provide the user with access to photos on the device and allow one to be selected for inclusion in the Facebook post.

With these requirements in mind, select the SocialAppViewController. Next, add the other image picker delegate methods so that the picker is dismissed when the user has made a selection:.

When the user touches the view object in the background of the user interface, we need the keyboard to be removed from view. This will require that code be implemented in the touchesBegan method:. These tasks are to be performed within the sendPost action method.

Within the SocialAppViewController. The code simply creates an array of items to be included in the post in this case the text entered by the user and an image in the event that one was selectedcreates a UIActivityViewController instance initialized with that array and presents the controller to the user.

With the coding now complete, click on the Run button in the Xcode toolbar to launch the application on an iPhone device. When the application appears, enter some text into the text area and select an image from the device note that when using the simulator no images will be available. Touch the Post Message button to display the target selection screen shown in Figure facebook integration ios 7 tutorial Select the Facebook button to display the preview sheet Figure and then, assuming no changes to the post need to be made, touch the Post button to send the message to your Facebook page.

The next chapter will look in more detail at using both the Accounts and Social Frameworks to implement social network integration using the SLRequest class. Jump to: navigationsearch. Navigation menu Personal tools. Namespaces Page Discussion. Views Read View source View history.

This page was last modified on 27 Octoberat Privacy policy About Techotopia Disclaimers Mobile view. Table of Contents.

 

iOS Programming: Integrate Twitter and Facebook Sharing in iOS 6 App

 

facebook integration ios 7 tutorial

 

Sep 19,  · Culture Understanding Facebook integration on iOS 6. Apple and Facebook teamed up to bring Facebook integration throughout iOS 6. Here's what you need to chipshopp.gq: Jason Cipriani. Getting Started with the Facebook SDK for iOS. The Facebook SDK for iOS is the easiest way to integrate your iOS app with Facebook. It enables: Facebook Analytics - Understand how people are using your product. Facebook Login - Authenticate people with their Facebook credentials. Share and Send dialogs - Enable sharing content from your app to. Following the Twitter support in iOS 5, Apple added the support of Facebook in iOS 6. In the past, developers have to make use of the Facebook and Twitter API to integrate the sharing feature in their apps. With the built-in support, it’s much easier to add these social features to your own app Author: Simon Ng.