Social media is an important part of our daily lives, so much so that we use our accounts not only for interaction with our friends or colleagues, but also to log in on several online services and then share information from the social media account with the service you signed up for. This is called social login, and the OAuth protocol is used to authenticate the user and to obtain access the user's data.
There are two versions of the OAuth protocol. The first version is referred to as OAuth, while the second one is known as OAuth2. The version that will be used to share information will depend on the third-party application you are integrating with. For example, Facebook provides an API that uses OAuth2 but Twitter does not. So you can use OAuth2 to integrate your application with Facebook; but to integrate with Twitter, you need to use OAuth.
In this chapter, we will learn how to build such interaction between social media such as Facebook and Twitter with an application...