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

react-twitter-widgets

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-twitter-widgets

Twitter widgets as React components

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
24K
decreased by-17.63%
Maintainers
1
Weekly downloads
 
Created
Source

react-twitter-widgets

Alleviates the need for Twitter's default 2008-style widget snippets.

Available widgets: Timeline, Share, Follow, Hashtag, Mention, Tweet.

See below for usage.

Installation

npm install --save react-twitter-widgets

Example

import { Timeline } from 'react-twitter-widgets'
// var Timeline = require('react-twitter-widgets').Timeline

ReactDOM.render((
  <Timeline
    widgetId={'29838471883830183'}
    options={{
      username: 'TwitterDev',
      height: '400'
    }}
  />
), document.getElementById('root'))

Usage

Available widgets: Timeline, Share, Follow, Hashtag, Mention, Tweet

All widgets take an optional options object prop. To learn more about the available options (height, width, align, count, etc), see this link.

Timeline requires the widget id supplied by Twitter as widgetId (ex. '123456'). Also, note that you can override your configured screen name with a custom screenName (username) in the options object.

Share requires a url prop.

Follow and Mention require a username prop.

Hashtag requires a tag prop.

Tweet requires a tweetId prop. Ex. '511181794914627584'

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Credits

License

MIT

Keywords

FAQs

Package last updated on 04 Mar 2016

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