The Facebook SDK for iOS makes it easier and faster to develop
Facebook integrated iOS apps.
The Facebook SDK 3.1 for iOS adds support for the Facebook
integration in iOS 6.
The SDK enables support for core Facebook
integration features in iOS 6 such as: Native Facebook Login, which is the first step in using Facebook to drive user
engagement and app installs. Sharing: Native sheet for posting to Facebook. Learn more about the Facebook integration in iOS 6.
Native Login Dialog
Share Dialog
Along with support for the iOS 6 integration, our SDK provides
advanced functionality that makes it easier to build more immersive
social experiences, distribute and promote your app. These features
include: Native, ready-to-use UI controls: The SDK includes several pre-built user interface controls:
Friend Picker to help apps easily pick friends. Example: use a friend picker to choose friends to tag in an Open Graph action.
Places Picker so apps can easily integrate with Facebook places.
Example: use this picker to let users include a place with their posts.
Profile Picture control so your app can easily show the profile
picture of a user, their friends, places, or other kinds of Facebook
objects.
Login controls for easily building Login and Logout experiences.
Drop these controls into your apps to build fast, native and consistent experiences for common app features.
Login UI
Place Picker UI
Seamless Facebook Login across iOS versions: Lets your app work seamlessly on all iOS versions 4.3+ and easily integrates with the native login support in iOS 6. Easy session management: Introduces the FBSession
API that manages, stores, and refreshes user tokens. You can also
override default behaviors to build advanced features. It uses the
modern Objective-C “block” metaphor to notify your app of login, logout
and other session state changes, and it instantly integrates with iOS 6. Improved API support: Minimizes the code you need to
call Facebook Graph, FQL, and other APIs. It natively supports batched
API requests to significantly improve performance for API calls, which
translate into faster, better user experiences. Mobile install measurement: With our SDK, you can measure clicks and installs for mobile app install ads. Learn more about mobile app install ads.
The Facebook SDK for iOS is designed to be easy to install and use.
This guide walks you through the basics of setting up the development
and project environment and creating a simple app.
Watch the screencast or follow the steps below.
OS X is required for all iOS development. If you're completely new to iOS
development, you'll need Xcode installed on your Mac too. It's available through
the App Store.
Download the SDK here and install the package. The default install location is ~/Documents/FacebookSDK.
Source code for the SDK is also available on GitHub, and if you have Git installed, you
can create a local repository by cloning it to a location of your choice:
This allows you to keep the SDK up-to-date by simply pulling new commits to the repo.
Note that when building the SDK from source, you must first run scripts/build_framework.sh
before compiling and running the samples.
3 Run the Samples
Try the sample projects in the Samples folder of the installed SDK
The SDK includes a number of samples, each of which demonstrates an
important part of the SDK and various techniques for building social apps.
The following samples are available in the SDK. Simply open the Xcode
project files inside each of the folders.
Basic samples
ProfilePictureSample: demonstrates non-logged-in usage of the profile picture control
FriendPickerSample: demonstrates usage of the native friend picker to choose amongst the user's friends
PlacePickerSample: demonstrates logged-in usage of the place picker control
Feature samples
SessionLoginSample: demonstrates detailed login flow using the SDK
JustRequestSample: demonstrates logged-in user making single and batched Facebook API requests
BooleanOGSample: demonstrates publishing an Open Graph custom action type
SwitchUserSample: demonstrates an approach to allow switching between multiple users
Complete samples
HelloFacebookSample: an all-round sample that demonstrates profile access, status updates and photo uploading
Scrumptious: demonstrates the use of login, requests, pickers, picture uploads, and Open Graph publishing
Hackbook: another sample app demonstrating a selection of Graph API calls
Note that to see the native Login Dialog and the native share dialogs in action, you
must first log in to your Facebook account on your iOS device: Settings > Facebook.
4 Create a Facebook App
You will need a Facebook App ID before you create a new project with the SDK
Create a new app on the Facebook App Dashboard, enter your app's basic information.
Once created, note the app ID shown at the top of the dashboard page.
Alternatively, you can of course use the ID of an existing app.
Now, you need to set the Bundle Identifier and configure your Facebook application to support login from an iOS application.
(Note: this is a new step in the Facebook SDK for iOS v3.1. Previous versions of the SDK did not require this step.)
Click on the checkmark next to “Native iOS App” and supply your Bundle Identifier in the “Bundle ID” field. In addition, make sure the Facebook Login radio button is set to “Enabled”.
You can find or set your Bundle Identifier in Xcode in the Project tab.
5 Configure a new Xcode Project
Create a new Xcode project, add the Facebook SDK for iOS, its dependencies, and the Facebook App ID to its settings
In Xcode, create a new project, and select 'Single View Application' as shown below.
Provide a name and identifier as required:
Adding SDK & framework dependencies
Add the Facebook SDK for iOS Framework by dragging the FacebookSDK.framework folder from the SDK installation folder into the Frameworks section of your Project Navigator.
Choose 'Create groups for any added folders' and deselect 'Copy items into destination group's folder (if needed)' to keep the reference to the SDK installation folder, rather than creating a copy.
Add the Facebook SDK for iOS resource bundle by dragging the FacebookSDKResources.bundle file from the FacebookSDK.framework/Resources folder into the Frameworks section of your Project Navigator.
As you did when copying the Framework, choose 'Create groups for any added folders' and deselect 'Copy items into destination group's folder (if needed)'
You can also add the FBUserSettingsViewResources bundle in the same way if you expect to use that controller in your app.
The SDK relies on three other frameworks (AdSupport, Accounts and Social) to use the Facebook features built into iOS6. To add these, go to the 'Linked Frameworks and Libraries' section of the target's Summary pane, and click the 'plus' button to add them: Note: You should use the 'Optional' flag for iOS6-specific frameworks if you would like your app to also build for older versions of the operating systems.
Once done, your Project Navigator should look something like this:
Adding SQLite
Next you need to add the ''-lsqlite3.0'' SQL library to the list of build dependencies in the Build Settings pane:
Adding your Facebook App ID
Finally, you need to place the Facebook app ID in two places in your application's main .plist file. Create a key called FacebookAppID with a string value, and add the app ID there:
Also, create an array key called URL types with a single array sub-item called URL Schemes. Give this a single item with your app ID prefixed with fb:
(This is used to ensure the application will receive the callback URL of the web-based OAuth flow.)
6 Start Coding!
Get started by enhancing one of the sample apps, or working through the Scrumptious Tutorial.
9GAG is this week’s no. 1 PTAT gainer for app pages on Facebook, according to our PageData tool,
which tracks page growth across Facebook.. The image-based website has
integration with Facebook as well as an official iPhone app. It
currently has 5.4 million monthly active users.
We compile this list with our PageData tool, which tracks page growth across Facebook.
As
a meme website, 9GAG uses similar content that would be shared on its
website on its Facebook Page. This type of content often goes viral,
which is a big reason why the page is No. 1 this week.
At No. 2, AMC The Walking Dead Social Game saw a strong increase in engagement due to a post
about the third season of the television show. Having a large
following, the post saw over 50k shares helping to bolster its PTAT for
the week. However, the game has been declining in monthly active users
since November.
No. 3 on the list, the iOS app Hay Day has 3 million monthly active users. The app page makes good use of calls to action to get fans to engage with posts, such as the one below.
Facebook’s new Graph Search tool gives users who allow followers — formerly called subscribers — a way to learn about their audience.
Facebook launched asymmetrical following in September 2011.
Users can allow followers to see their public updates in News Feed,
similar to Twitter. The feature is commonly used by public figures and
people who use Facebook to connect with people in their industry or who
share similar interests. However, unlike with Facebook pages, users do
not get any analytics about the audience that follows them.
Now with Graph Search, users can uncover some information about these
followers. For instance, someone might want to know the countries or
cities where their followers live. The most popular pages, movies, music
and other interests of their followers might be relevant. Users might
want know where their followers work or what schools they went to. They
also might want to get an idea of the age, gender or education level of
their followers. All of these insights are now accessible using Graph
Search.
Users can look for overlap in people who follow them who also follow
another user, or people who follow them who are interested in a topic.
Of if a user wants to host a meet-up, they can search for followers who
live nearby or in a particular city.
Facebook’s free voice calling service has begun rolling out to users in the U.S. after a trial in Canada that began earlier this month.
As first reported by The Verge,
voice calling will be made available to U.S. users with the latest
version of Messenger for iOS starting today and will gradually be
brought to more users.
Users can call their friends — who also need the latest version of
Messenger for iOS and to be part of the initial test group — by tapping
the “i” icon in the top right of the screen when messaging a friend and
then tap “Free call.” The profile picture of the user being called will
take over the screen and a ringing sound will play as the call attempts
to connect. The recipient will get a push notification about the person
who is calling. If they miss the call, they will see a notification and a
record of the missed call will be included in the users’ conversation
history. These calls are voice-only and are not cross-platform.
Facebook calls are free but contribute to people’s data usage unless
they have a Wi-Fi connection. There are a number of existing voice
calling services that are also free, but they require both parties to
have downloaded the application. With Facebook’s ubiquity, this is less
of a hurdle.
At the start of January,
Facebook added asynchronous voice messages to Android and iOS
Messenger. Users can send each other voice messages up to one minute
long. This feature is similar to mobile walkie-talkie apps, which can be
used for fun or utility, for example when a user doesn’t want to type a
long message or doesn’t want to interrupt someone with a phone call.
Instagram today announced that the photo sharing service has 90 million monthly active users and sees 40 million photos uploaded per day.
Instagram had reported 80 million registered users five months ago, and in November, a job listing mentioned
that the service had more than 100 million registered users, but the
company had never reported monthly active users figures. This latest
announcement refutes speculation that Instagram might have lost users
after a proposed policy change.
Last month
the New York Post reported that Instagram had lost about a quarter of
its daily active users, citing data that was not representative of the
service’s entire user base and blaming the terms of service controversy. Instagram did not reveal its true DAU count, and Facebook has cut off public access to the data used by the Post.
Instagram did share that its platform experiences 8,500 Likes per
second and 1,000 comments per second. That’s up from 575 Likes and 81
comments per second announced in April 2012 when the service had 30 million registered users and 5 million photos per day.
Instagram’s new privacy policy and terms of service
go into effect on Saturday. The company faced criticism for its initial
proposed policy, so it decided to reinstate its original section on
advertising and made a few other tweaks to clarify that it does not plan
to sell user photos. In general, the new policy better reflects
Instagram’s status as a Facebook affiliate and allows data to be shared
between the two entities.
Facebook Graph Search addresses several categories of search — some that were made explicit during Facebook’s announcement on Tuesday and others that are still being discovered as beta users try it out.
Navigation around Facebook, people discovery and recommendations for
places and entertainment are valuable features the company has already
highlighted. One of the less obvious realms is research.
We’ve talked about how businesses can use Graph Search to uncover consumer insights and how public figures can use it
to better understand their followers, but there are other interesting
applications for students, researchers, journalists and everyday users.
Facebook’s combination of identity and structured data allow users to
answer very specific questions that no other service can. Although
Graph Search uses natural language processing to understand what users
are actually looking for rather than simply matching keywords, one might
get a better sense of what’s possible with the tool by thinking about
the following formula:
Type of Content + Subject + Type of Person + Location + Time
Facebook removed 19 job listings from its careers page this week, likely after filling roles in the areas of engineering, recruiting, sales, marketing and data analysis.
Notable hires include a technical program manager devoted to mobile, a
software engineer focused on research tools and a team lead for media
solutions in France and Benelux.
The company also appears to have hired a space planner to help
configure the layout of its Menlo Park, Calif. headquarters and assist
employees and departments as their space and equipment needs evolve.
Prior listings removed from Facebook’s careers page:
Facebook added 27 new positions to its careers page this week, including a number of openings on the security, engineering, finance, marketing and sales teams.
The company added a listings for a security program manager, a
security operations center manager and a safety and security engineer.
Other noteworthy jobs include a vertical client partner focused on
fast-moving consumer goods, a manager of ecosystem measurement and a
presentation designer for the business marketing team.
Facebook today released an update
to its main Android application, which gives users more control over
how they share items from mobile News Feed, as well as the option to
send voice messages to their friends.
When users tap the share button
from the feed, they’ll now have the option to set the location for
where they want to share the story. Previously on mobile, users could
only post items to their own Timeline, but now they can select a
friend’s Timeline, a group or a page. Unlike with the desktop share
button, users cannot use the mobile share button to send something to
another user via private message.
Android users can now send their friends voice messages from the main app. This feature was recently added
to the standalone Messenger application, and because Facebook uses the
same code base, it functions the same way now within the main app. Voice
calls, which are available for some iOS users, are not yet an option for Android.
Facebook also says photo viewing has gotten faster in this latest update.
Facebook is restricting access to friend data for Voxer, the mobile
messenger and walkie-talkie app it now identifies as a competitor, a
Facebook spokesperson confirms.
Voxer told AllThingsD
today that it was given 48-hour notice that it would lose access to the
feature that allows users to connect with Facebook and find friends to
message with Voxer. Many apps use this feature to grow their user base
and make it easy for users to find value in their services, however,
Facebook has a policy against competing social networks using its data
this way.
Voxer says it does not consider itself a social network, and Facebook
likely didn’t view them as a competing service until recently. Facebook
added voice messaging to its platform earlier this month.
A Facebook spokesperson, who could not offer an official statement
and asked not to be quoted directly, told us that the company’s stance
is that apps that duplicate a core functionality of Facebook should not
be able to take data out of Facebook without sharing anything back. That
justification is not laid out explicitly in the social network’s
platform policy, which simply reads:
“Competing social networks: (a) You may not use Facebook
Platform to export user data into a competing social network without our
permission; (b) Apps on Facebook may not integrate, link to, promote,
distribute, or redirect to any app on any other competing social
network.”
Facebook shares back below $30 - Wall Street was apparently unimpressed with Facebook’s Graph Search announcement. Facebook shares, which surged past
$31 last week in anticipation of the company’s first big press event
since going public, closed today at $29.66, down 6.5 percent from
Monday. The share price began to drop immediately following CEO Mark
Zuckerberg’s announcement of an overhauled search product. Although the
tool has a lot of future potential, it is in very limited beta for
English speaking users on desktop and Facebook did not announce a
corresponding monetization plan for the tool. Investors may have also
been let down after rumors of a Facebook phone, e-commerce products and
possible new ad types did not materialize.
Bing adds more Facebook info to social search – Shortly after Facebook revealed its Graph Search beta product
this week, Bing announced more features for its social search sidebar.
The search engine now incorporates Facebook status updates, shared
links, comments and photos from friends that may be relevant to a user’s
query. Facebook updates PMD policies - Facebook added four
new sections to its Preferred Marketing Developer policy page this
week, including a new rule about comparing Facebook ads to ads from
other channels. If using last-click attribution, PMDs must create
separate reporting tools for comparing search marketing and Facebook
ads. Additionally, Facebook made it mandatory for Ads API companies to
provide PMD Team members with login credentials upon request, and noted
that advertising apps need separate App IDs for self-service, managed
service and white-labeled apps. The company also made it clear that it
reserves the right to grant or remove access to the platform or program
at its sole discretion.
Facebook announces innovations in hardware design – Facebook revealed
a number of advances in data center hardware design at its Open Compute
Summit on Wednesday. Facebook contributed a new architecture
specification for motherboards. This specification nicknamed “Group Hug”
can be produce motherboards that are completely vendor-neutral. This
disaggregation could improve efficiency in data center construction and
operation.