Introducing the Facebook Graph API

The Graph API is the primary way to read and write data to Facebook. It can be used in a immens variety of ways. In this chapter, we will use this API to fetch and post the user data to Facebook. You can get a better idea of how to access the remote APIs or content from Electron by using this Graph API. Basically, there are multiple ways available with an Electron application to connect to a remote endpoint or to fetch data from the remote server. When you want to fetch or post data to a remote server from your main process, you need to use any of the available HTTP client libraries available for the Node.js framework. Node's built-in HTTP module, Request JS, and isomorphic-fetch are some of the best examples of these kinds of libraries. Connecting to a remote server from a renderer process is much easier than the main process. There you can use standard fetch or XmlHttpRequest APIs to do your jobs. You can also make use of third-party Node.js modules, that we mentioned for using in the main process, to fetch or post data to a remote server from a renderer process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.29.139