Giter Site home page Giter Site logo

kitchen5203 / twitter-interaction-circles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duiker101/twitter-interaction-circles

0.0 0.0 0.0 2.01 MB

A guide project on how to make interaction circles for Twitter

License: MIT License

JavaScript 100.00%

twitter-interaction-circles's Introduction

Example

Twitter Interaction Circle

Originally from Twopcharts it has been making the round in the dev community. I believe this is a great opportunity for a project to learn from. The concept is easy and straightforward but the realization encompasses a lot of concepts.

You can read more about the realization of this project on the HackerTyper Blog.

Installation

git clone [email protected]:duiker101/twitter-interaction-circle.git
cd twitter-interaction-circle
yarn install

Run with

yarn build

You can also generate a text version of the image with the complete list of the presented users with the following command

yarn build --text

The output will go in users.txt file in the root of the project

Setup

To use the project you will need Twitter API keys. You can get one on the developer portal.

As this project uses only public data, you don't need an authorization key, but you can generate a Bearer Token. This will prevent you from fetching any private data but will grant you slightly higher rate limiting.

More information about Twitter's bearer tokens can be found here

Once you have your consumer keys, rename the .env.example file .env and put them in there, it should look like this:

CONSUMER_KEY=AAAA
CONSUMER_SECRET=BBBBBB

Make sure you don't have spaces.

Modifications

If you wish, you can replace the first part of the main loop in the index.js to use the getUser() function instead of getMe(). This will allow you to generate the circles for any public Twitter user. All the API methods used take advantage only of public data.

Challenges

You can try to apply the following changes to test your knowledge:

  • Apply a shade to each avatar based on the most common type of interaction
  • Fetch the circles for another user
  • Render a grid instead of the circles

twitter-interaction-circles's People

Contributors

duiker101 avatar watheqalshowaiter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.