/critter

View twitter search results and user profile tweets without an account (React+Express)

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Critter

Critter is a twitter front-end that allows you to view twitter search results and user profile tweets without an account. Uses react front-end with express backend.

Crawl + Twitter = Critter

How it works

  • API call is made by react front end to express backend server

  • Server fetches up to 20 search results from Startpage using the site: search operator to restrict results to twitter.com for general search or twitter.com/username for tweets from a specific user.

  • A guest token is used to fetch the twitter data. Guest tokens expire after 9e6 milliseconds or 2.5 hours, so the server checks if the current token stored in the token.json file has expired and fetches a new one if needed.

  • The twitter tweet data is fetched via the 'TweetResultByRestId' api call using the rest id number in the twitter urls grabbed from the Startpage search results. The twitter user profile data is fetched via the 'UserByScreenName' twitter API call using a username.

  • Twitter data is sent to the react front end and displayed.

Twitter API

The Twitter API calls used are the same used when one views an individual tweet or a twitter user's profile (as a "guest" without a twitter account) using a web browser. Anyone can copy these requests as Powershell, Fetch, Node.js fetch, cuRL, etc in the Developer Tools of your web browser.

TweetResultByRestId

screenshot_individual_tweet_javascript_console_fetch

UserByScreenName

screenshot_user_profile_javascript_console_fetch

Guest Token

https://api.twitter.com/1.1/guest/activate.json

See: StackOverflow

Screenshots

Home

screenshot_home

Profile

screenshot_profile

Search

screenshot_search

Search Results

screenshot_search_results_bukayo_saka