# Build a Twitter-quine

A short while, ago, @daniel_ernston sent the following challenge to @StackCodeGolf on Twitter:

@StackCodeGolf Your task is to build a program that uses the API of your choice to tweet its own source code. Shortest code wins, of course.

• What about reading the source code and other quine cheats? – Martin Ender Mar 7 '15 at 3:06
• All permissible. I want to see how short you can get it, and I have a suspicion it may not be possible if I don't open those up. – Joe Z. Mar 7 '15 at 3:08
• If you can come up with a solution that doesn't use that cheat, though, then by all means I'll give you an honourable mention (and maybe even a bounty). – Joe Z. Mar 7 '15 at 3:08
• Hm, won't this depend quite heavily on the chosen user name and credentials? (Both whether it fits in the tweet and the actual score.) – Martin Ender Mar 7 '15 at 3:15
• I don't have a twitter account and while I could create one, I have to give them my phone number to get an api key, maybe someone could post api keys from a throwaway account for everyone to use. This would also make the challenge fairer since they would be the same length. – Maltysen Mar 8 '15 at 19:25

# Processing.js, 38 characters

window.open("http://tinyurl.com/erjk34");


Here is the tweet, in all its glory: https://twitter.com/StaticVoidGames/status/575425948562014209

And here is my previous entry at 95 characters:

function q() {
};{q();}


# HTML, 22 characters

http://tinyurl.com/erjk35

• It this what was meant by tweeting or was it referring to the REST API dev.twitter.com/rest/public? – Maltysen Mar 10 '15 at 20:51
• @Maltysen It sends a tweet, so I'm counting it as fair game. It might be cheating, but hey, OP said that cheating was allowed! :p – Kevin Workman Mar 10 '15 at 20:56
• Okay then, +1 for loopholes. – Maltysen Mar 10 '15 at 21:05
• Well, uh, the TinyURL should post the tweet entirely by itself, without requiring you to press the "Tweet" button... – Joe Z. Mar 10 '15 at 23:48
• @JoeZ. I went into this knowing that it was probably cheating- especially my last update, haha. I just figured it would be fun to try, especially since you didn't have any answers after 3 days! – Kevin Workman Mar 11 '15 at 0:00