Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-source-twitter-own

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-source-twitter-own

Fetch data from Twitter API

  • 1.4.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-source-twitter

Source plugin for pulling data into Gatsby from Twitter Search API.

How to use

// In your gatsby-config.js
module.exports = {
  plugins: [
    {
        resolve: `gatsby-source-twitter`,
        options: {           
            q: `@wesbos`,    
            credentials: {
                consumer_key: "INSERT_HERE_YOUR_CONSUMER_KEY",
                consumer_secret: "INSERT_HERE_YOUR_CONSUMER_SECRETE",
                bearer_token: "INSERT_HERE_YOUR_BEARER_TOKEN"
            },
            tweet_mode: 'extended'
        }
    }
  ],
}

Plugin options

  • q: A search query. Reference to Twitter Search Tweets API
  • count: Number of tweet (default 100)
  • credential: You have to create an App on Twitter and creating a bearer token following this instructions using your consumer key and consumer secret
  • tweet_mode: Define how tweets are rendered. Possible values compat or extended (default: compat) More Details
  • result_type: Default mixed, could be mixed, recent or popular
  • fetchAllResults: Fetch all pages result

How to query your Tweets data using GraphQL

Below is a sample query for fetching all Tweets nodes.

query PageQuery {
    allTweet {
        edges {
            node {
                created_at
                text
                user {
                    name
                }
            }
        }
    }
}

Warning: id field is not the tweet id, but Gatbsy internal node id. Use id_str if you need to use the tweet id

Keywords

FAQs

Package last updated on 11 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc