Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/glweems/gatsby-source-facebook-graphql

Gatsby Source Plugin for Facebook
https://github.com/glweems/gatsby-source-facebook-graphql

facebook-api facebook-graph-api gatsby gatsby-plugin gatsby-source

Last synced: about 2 months ago
JSON representation

Gatsby Source Plugin for Facebook

Awesome Lists containing this project

README

        

# Gatsby-source-facebook-graphql

A Gatsby source plugin for sourcing data into your Gatsby application from Facebooks graph API.

## Install

`npm install --save gatsby-source-facebook`

or

`yarn add gatsby-source-facebook-graphql`

## How to use:

```javascript
// In your gatsby-config.js
module.exports = {
plugins: [
{
resolve: `gatsby-source-facebook-graphql`,
options: {
// Facebook account or page ID
pageId: 1690402924350633,
params: {
fields: [
'about',
'bio',
'category',
'category_list',
'company_overview',
'features',
'hours',
'phone',
'location',
'username',
'description',
'products',
'photos{webp_images}',
'rating_count',
'place_type',
],
},
// Access Token from facebook
accessToken: process.env.GATSBY_FACEBOOK_GRAPH_TOKEN,
},
},
],
}
```