Coder Social home page Coder Social logo

twivatar's Introduction

No longer works

Twitter has managed to finally kill this (and related) projects. Sorry, I've looked and I can't see a solution.

Twivatar

Twivatar is a RESTful API to a Twitter user's avatar built out of frustration of external Twitter apps breaking when the avatar url is stored, and then changed by that user later on Twitter - the result is a broken image on that app unless they constantly check for profile changes.

Usage

<img src="https://twivatar.glitch.me/[screen_name]" />

Alternatively you can specify the size image you want from:

  • mini (24x24)
  • normal (48x48 - default)
  • bigger (73x73)
  • original

<img src="https://twivatar.glitch.me/[screen_name]/[size]" />

Behind the scenes

This is a simple one script app that stores the url of the avatar. When the avatar is requested for x user, it runs the following logic:

  1. Get the mobile HTML from twitter
  2. Run the HTML through cheerio and find the .Avatar element
  3. Request the image URL and pipe to the response
  4. All requests also include CORS headers so you can manipulate in a canvas

License

MIT: http://rem.mit-license.org

twivatar's People

Contributors

remy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

twivatar's Issues

API consume

I'm sorry if this is wrong place to ask.
To get user's avatar we still must consume RESTFUL Api?
We can't make it with streaming api which isn't rate limited?

So how do you manage it in "http://twivatar.herokuapp.com/"
Don't you consume API rates.?
AFAIK there is no whitelisted application.
Thank you.

Problems in Firefox and Internet Explorer

Hey I'm using twivatar to pull avis for an add site for fans of local college athletics on twitter and I have had no problems getting everything to work perfectly in chrome but it's on again off again in firefox and ie. Is this something you have heard before or do you have any idea why this may be? The project I'm playing with is on github so you can go to my profile and see what I have going on if that may help you figure out what is happening here.

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.