GithubHelp home page GithubHelp logo

twitter-fakenft's Introduction

Twitter FakeNFT

This project is a server that fetches your Twitter profile picture and applies the hexagonal transparency mask displayed on the profiles of users who have an NFT profile picture.

image without cropping image after cropping

More info about Twitter NFT pictures here

The profile picture change needs to be done on Twitter Desktop with the picture generated by this server (you'll need to right-click > save as, isn't it ironic?), otherwise Twitter will trigger some modifications that remove the transparency.

Getting Twitter tokens

You need to provide your API keys to the program so it can work (only used to get a user's profile picture URL)

  • Request a Twitter API key on The Twitter developer portal. This only takes a couple minutes, you need to have a verified phone number on your account.
  • Generate a user token for the app you just created on the developer dashboard
  • You should now have 5 secrets provided by Twitter. Store them in their corresponding strings inside api_secrets.py

Technical details

You will need to install the following packages:

pip install tweepy pillow Flask Flask-Limiter

Twitter's API limits allow us to do 900 profile picture URL requests per 15 minutes (1/second on average). If there are too many requests it can block the service, so there are two things to avoid that:

  • A local lru_cache stores the resulting image for a given user so we don't have to fetch the base image again
  • There is a rate limit on the server to avoid a single user filling the limit for everyone (currently 5/minute and 20/hour)

Start

./launch.sh

Since the server runs on port 80, it needs sudo rights. If you don't want that, you can just change the port and remove sudo in launch.sh.

This command displays server logs, but exiting with Ctrl-C will not kill the server.

Why?

It's all about having fun! NFTs are a scam and people who use this feature are show-offs.

NFT pictures are not only about the hexagon!!! :(

Yep, but this project is the closest you're ever gonna get to an NFT profile picture without having to spend $100 to mint stolen art on the blockchain and pay $3/month on a Twitter Blue subscription. Also, cry louder

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.