Fetching Twitter User Information With Node.js

Sometimes you need detailed information about a particular Twitter user, and the most common way is to do this via the Twitter API.

Robin Schulz
Robin Schulz

--

By using the Twitter API, you have to create a Twitter application and set up the keys for authentication, request limitation, and so on. If you only need the follower or following count, the country, the user image, etc., do it more efficiently by parsing the website content of the Twitter user page. Since Twitter puts a full JSON object in the DOM user pages, it is easy to retrieve user information.

You can either clone git clone https://github.com/bulletinmybeard/fetch-twitter-user-info-with-node.js.git or download the GitHub repository https://github.com/bulletinmybeard/fetch-twitter-user-info-with-node.js/archive/master.zip.

Installation/Usage

After cloning or downloading and unzipping the archive, go to the root folder of the project and install the dependencies withnpm install. Run ts-node twitter.ts afterwards to retrieve the user JSON object.

Feel free to fork the repository and drop me a comment.

cheers \w

--

--

Self-taught Full Stack Web Developer | Audio Engineer | Technology Evangelist | Blogger | Gamer | Streamer | Musician