官术网_书友最值得收藏!

Creating an application on Facebook

You need to register your project as an application on Facebook before you can access the Facebook API using Delphi. We can do this using the following page: https://developers.facebook.com/apps. The page will look like the following screenshot:

We will create the application on the Facebook platform, which is necessary to perform the integration and log in on the Facebook platform for this project and follow these steps:

  1. Add a new application to Facebook. For this chapter, we will call it DelphiProjectsPackt:

  1. Solve the reCAPTCHA and Submit your information:
  1. Navigate to Select a Scenario | Integrate Facebook Login:
  1. Before saving changes, fill in the two required fields—Privacy Policy URL and Category:
  1. Save the changes.
  2. Click on Finish Quickstart, as shown in the following screenshot:
  1. Select Web in Quickstart options:
  1. Confirm the next steps, advancing with the information requested by Facebook.

At this point, it is important that you save the application ID to use later in our Delphi components, in order to access the Facebook platform.

To enable Facebook login in a desktop app, we need to embed a web browser (also referred to as WebView) within the app to carry out the login process.

Facebook has several methods for platform access for developers. For mobile devices, it is best to use the SDK. We will use the hybrid model; in this model, you can connect using your desktop application and, including with your mobile application, with FireMonkey.

Let's work on the hybrid model. Try using the official Facebook SDK in your Android and iOS apps. In GitHub, there is a development project called grijjy. Check out this link for more information: https://github.com/grijjy/DelphiSocialFrameworks.

It is necessary to initially create an application on the Facebook platform because we need the access token, which will later be your access key to use the Graph API.

主站蜘蛛池模板: 宁化县| 科尔| 台中市| 阿拉善右旗| 邓州市| 双峰县| 桂平市| 珲春市| 安庆市| 锦州市| 河曲县| 张家口市| 武邑县| 潢川县| 昌乐县| 睢宁县| 健康| 长宁县| 南昌县| 金堂县| 南昌县| 潼关县| 图木舒克市| 湖南省| 夏河县| 苏州市| 广昌县| 淄博市| 平邑县| 卫辉市| 珠海市| 道孚县| 华蓥市| 长葛市| 江西省| 舒兰市| 阜南县| 荆门市| 茌平县| 永嘉县| 阜宁县|