UNPKG

graph-api

Version:

Facebook Graph API SDK for NodeJS

71 lines (49 loc) 1.61 kB
# graph-api > Facebook Graph API SDK for NodeJS. [![NPM](https://nodei.co/npm/graph-api.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/graph-api/) A way to use the Facebook Graph API without being angry about unreadable code, lot of dependencies and hard to learn syntaxes. ## Installation Using npm: ```sh npm install graph-api ``` Clonning the repo: ```sh git clone https://gitea.melvillei.org/mmendescortes/graph-api.git ``` ## Self-mode usage example Require the module: ```js const fb = require('graph-api'); ``` Set the options: ```js fb.options( 'self', 'your_desired_callback_url', 'your_access_token' ); ``` Make a query: ```js fb.get(['id', 'name'], function(data){ // your code here }); ``` _Note: This query example is only valid for self mode! For more examples and usage, please refer to the [Wiki][wiki]._ ## Release History * 1.0.4 * CHANGE: Renamed callback to callback_uri, fixed facebook's callback bug and deleted some unecessary code. * 1.0.3 * CHANGE: Token class is updated and callback class is merged onto options class. * 1.0.2 * CHANGE: Overall Improvement. * ADD: Creation of the dialog and token classes. * 1.0.1 * Work in progress ## Meta Mateus M. Côrtes – [@mmendescortes](https://twitter.com/mmendescortes) – mmendescortes@gmail.com Distributed under the Mozilla Public License 2.0. See ``LICENSE`` for more information. [https://gitea.melvillei.org/mmendescortes/graph-api](https://gitea.melvillei.org/mmendescortes/graph-api) [wiki]: https://gitea.melvillei.org/mmendescortes/graph-api/wiki