Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/glweems/gatsby-source-facebook-graphql
- Owner: glweems
- License: mit
- Created: 2019-07-23T15:22:37.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-09T19:28:05.000Z (about 2 years ago)
- Last Synced: 2024-11-03T04:06:27.199Z (2 months ago)
- Topics: facebook-api, facebook-graph-api, gatsby, gatsby-plugin, gatsby-source
- Language: TypeScript
- Size: 28.3 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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,
},
},
],
}
```