Dynamic Twitter Banner

I'm a self-taught web developer. I occasionally post summaries of my projects and what I learned from them. Thanks for tuning in! ❤
Search for a command to run...

I'm a self-taught web developer. I occasionally post summaries of my projects and what I learned from them. Thanks for tuning in! ❤
No comments yet. Be the first to comment.
Every beginner who wants to get into development must start somewhere. Although every beginner has a certain goal in mind like “getting a job in tech”, there are multiple options on where to start. Whether it's a bootcamp, Udemy course, university or...

In one of my previous blog posts, I demonstrated how to build a MidJourney alternative using Supabase and Hugging Face in a few minutes. This is great for personal use, but what are you going to do with these generated images? And what if you want to...

This blog post is all about creating a Multi-User Note App with Next.js and Supabase. We'll walk through structuring a dynamic database, and building cool interactive features for a smooth note-taking experience. Join us on this journey to build a sp...

There is no doubt that Midjourney is currently the leading tool for AI image generation out there. However, people who don't generate AI images daily may find the cost of their subscription a bit too much. So you can seek alternatives, but that's not...

Artificial intelligence (AI) became very trendy in the last half a year. With the introduction of ChatGPT, OpenAI took the spotlight in the AI space. This wonders nobody, as apart from offering this useful tool to normal folks, OpenAI offers many AI ...

As you might know, Twitter has a large developer community which often makes use of a powerful tool Twitter is providing them with. I'm talking about Twitter API. Just by browsing through Twitter you can find a ton of bots and services which make use of this API. Another popular use-case that you can encounter are follower counts. They can be integrated into name, bio or banner of your profile. But they often look identical and boring - just some plain numbers.
I was very interested in this type of project but I wanted to do something different, something more interesting.
That's when I came up with the idea of a moving object which could represent my followers count. By adding some details and a story to it we get:
"Gary the Snail who is hungry and wants to get to some food at the end of the road."

So... how did I do it? How can you make your own version and what tools do you need?
1) Get the tokens for your app on Twitter's developer page.
2) Use a library/add-on/module for Twitter integration. I've used Twitter Lite for NodeJS. But there are also other possibilities.
3) Create your design for the banner using photo-editing software, I used Photoshop but you can use paintNET, GIMP, etc. Don't forget to subdivide your design into different layers and export them separately.
Example:

4) Now it's time to get the followers count, create a single image out of the three above and update the profile banner:

5) Using a cron job you can repeat all the steps above in a specific duration you like.
That's how I integrated a followers count in my profile banner. If you want to see it in action, you can check my Twitter profile.
If you're stuck or you want to use exactly the same version, I uploaded the source code to my GitHub page.
This project was inspired by Suren's post.