Facebook this week introduced two major sets of developer tools for interacting with its various services. The company released a new software development kit for Apple's Swift programming language, and added lots of new features to its Graph API 2.7. Both toolsets are available in preview form, with full launches expected in the fall.
Apple debuted Swift at its Worldwide Developers Conference in 2014. Swift lets developers create apps that target all of Apple's platforms, including iOS, macOS, watchOS, and tvOS. Swift's popularity has grown swiftly, enough so that Facebook believes it is time to fully jump on board.
The Facebook SDK for Swift Beta should make it easier for developers to hook into Facebook using Swift. Facebook says the SDK includes native Swift frameworks that wraps around its existing Objective C SDK for iOS (Swift was created expressly to replace Objective-C). It includes four major functions.
First, the Facebook Analytics for Apps should let developers gain useful feedback and insight from their audience in order to help optimize the app experience and, yes, target them with ads. Second, the SDK includes Facebook Login, which is the world's most popular single sign-on product. Third, the SDK includes a Share to Facebook function that allows people to share links, photos, videos, and other content from the developer's app directly to Facebook. Fourth, and last, the Facebook SDK for Swift Beta includes the Facebook Graph API, which is the holy grail of access to Facebook's tools and services.
Facebook says the Facebook SDK for Swift Beta supports Swift 2.2.1 and 2.3, which should let developers target the Apple App Store as it is today. The SDK will add support for Swift 33 when it reaches general release later this year.
The Swift SDK beta is available for free via GitHuB, CocoaPods, or Carthage. Documentation is available here.
Next up is Facebook Graph API 2.7. Facebook first profiled the updated Graph API at its F8 developer conference earlier this year. The API is in testing and Facebook has learned enough from developers' use so far to know the API needs more tools.
First and foremost, Graph API 2.7 will permit audience restrictions for Live Videos. Developers can set targets for age, gender, language, or locations through the API. Facebook says this "makes live streaming more accurate and relevant." It gives developers (and Facebook) more control over who can see live video. Continuous Live Video is another function targeted in the new Graph API. This allows an unlimited live stream on Facebook. The social network envisions this might be popular with museums or zoos, where the public may want to tapa live video feed of their favorite animals or exhibits.
The remaining additions to the API target page insights/metrics, ad placements, and ad budgets. For example, the new Page metric lets developer see daily follow/unfollow counts and see a breakdown of organic versis paid traffic. Improvements to the Ad Placements tool should let advertisers more easily identify and select the best placement options. And, last, the Ad Budget Logic changes the way daily ad budget limits are interpreted.
A full list of changes to the API is available here.
Facebook warns that apps still using Graph API 2.0 need to be upgraded to Graph API version 2.1 by August 8.
"We know that the Graph API is an essential tool when developing apps with Facebook," said the company in a blog post, "and we're always working on improving it further." The next Graph API release is scheduled for later this fall.