Chapter 5
How to Integrate the Facebook SDK for Social Sharing
With the advent of social networks, I believe you want to provide social sharing in your apps. This is one of the many ways to increase user engagement. In the past, Apple provided a framework known as Social Framework that lets developers integrate their apps with some common social networking services such as Facebook. The framework gives you a standard composer to create posts for different social networks and shields you from learning the APIs of the social networks. You don't even need to know how to initiate a network request or handle single sign-on. The Social Framework simplifies everything. You just need to write a few lines of code to bring up the composer for users to tweet or publish Facebook posts within your app.
However, the Social framework no longer supports Facebook in iOS 11 (or up). In other words, if you want to provide social sharing feature in your app, you have to integrate with the SDKs provided by Facebook.
In this chapter, I will walk you through the installation procedures and usage of the APIs. Again, we will work on a simple demo app.
To continue reading and access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.