Building a Facebook REST API
Still talking about social networks, Facebook is undoubtedly the largest one. With more than 2 billion active users in 2018, it had twice the number of users of Instagram and WhatsApp. Curiously, Facebook owns both. Do not be surprised if a new social network belongs to billionaire Mark Zuckerberg.
This chapter will transcend the boundaries of Delphi; you will have to interact with the Facebook platform.
Initially, you will be introduced to Facebook's development platform in order to create an application on the social network. This application will be used to perform the integration between Delphi and Facebook.
You will then learn about Representational State Transfer (REST) concepts and the JavaScript Object Notation (JSON) standard. Basically, we will traffic a file or text in JSON format to a REST server, using the Facebook API.
Finally, with a properly configured Facebook application and the REST concepts learned, we will have what we need to do a Facebook login and search for the friends, for example. The possibilities will be according to the permissions that your application needs, from capturing personal information to posting a photo, video, and whatever else the Facebook API allows on the timeline.
Intermediate knowledge is needed to understand this chapter. It is necessary to be well aware of the concepts of web services and security.
In this chapter, you will learn about the following:
- Creating an application on Facebook
- Understanding request and response REST services
- Working with JSON
- Logging in with Facebook