UNPKG

twitter-helper

Version:

Allows to fetch data from Twitter without using its API. Does not require any authentication.

23 lines (17 loc) 902 B
# twitterHelper JS Twitter helper. Get data from Twitter without using its API. ## Warning It's based on a current implementation of URL structure of Twitter. It may change unexpectedly in the future. ## Usage This helper helps to get Twitter data, like user timeline from Twitter, without using OAuth API. It will fetch data that are accessible through Twitter widgets. ### Get user tweets Gettings user tweets is super simple. Just run the following method: ```javascript twitterHelper.getTweetsByUsername('sunpietro'); ``` And listen to the `tweetsByUsernameFetched` event dispatched onto the **BODY** DOM element. The event will contain tweets data (the latest 20 tweets by default). ```javascript document.body.addEventListener('tweetsByUsernameFetched', callback, false); ``` ## Browser support Tested only with the latest browsers versions available on the market. ES6 support is required.