How I Made Money Spamming Twitter with Contextual Book Suggestions
Two winters ago I left a position as a system administrator that was paying pretty well and moved cross-country to a region with less jobs than where I moved from. Three months later, I was still unemployed, broke, and bored. I was talking to my good friend Japhy on IRC one day and he was explaining to me how the tf-idf algorithm works. For reasons involving boredom more than any other reason, I dreamed up an idea: I would write software that would take a given document and generate book suggestions based on its content.
I think that most programmers would agree with me that we put in longer hours on code when we’re not working for anybody. We don’t stop learning, either. To us, unemployment is a brief sprint of academia spent in our home office, the local coffee shop, or our parent’s house. My imagination dreamed up this fairly straightforward process:- Take a given document and calculate tf-idf scores on all terms
- Select X number of the highest scoring terms
- Pass these high-scoring terms to an Amazon ItemSearch query
- Receive a list of recommended books (with URLs) from Amazon
I had already written multiple Twitter bots by this time so I decided to just use some of my existing code to poll Twitter’s search API. Essentially, the “documents” I mentioned above were actually tweets containing the terms “book” or “books.” Two and a half days later I had a working prototype that could generate a book recommendation from a given tweet. It was at this time that I added steps 5 and 6:
Reply to the tweeting user with their new book suggestion
Four months later and I had generated over $7,000 in sales for Amazon with over $400 commission for myself. Obviously, the commission I was making wasn’t livable but it was a nice addition to my then-depleting savings. Had I decided to scale out my operation, I could have made much more. My benchmark is at four months because that’s how long I went before being suspended. My conversion rate? 0.13%! While seemingly low, this number is very high when compared to email spam. However, it’s important to note that email spam is subject to various filtering technologies.
A fair amount of the time I share this story, people are more impressed with the fact that I went 4 months before getting suspended. The truth is, I had a lot of throttling built into my spam bot. The factors I think are important to point out are:
- Twitter’s Terms of Service at that time basically only outlawed “unsolicited replies,” nothing that really attacked targeted spam.
- Twitter’s anti-spam stance did exist in writing (only in the help site,) but I do not think they were actively enforcing their policies.
- My recommendations were contextual and, unless you looked at my bot’s timeline and tweet count, looked legitimate (most of the time.) In other words, I was tweeting book suggestions to people who were already talking about books.
- I recorded the usernames of everyone I sent recommendations to and would only @mention them once.
- I built in a “chattiness” rate limiting function. This was to distribute my spam throughout a whole hour (due to Twitter’s rate limiting) more than anything.


I just came across this article while trying to find a whitepaper on Twitter spam. It includes a graph that shows that pre-September ’09 spam volume was much higher. This graph correlates with the idea that Twitter’s anti-spam enforcement was much lower before this period!http://blog.twitter.com/2010/03/state-of-twitter-spam.html
I’m really glad to see this idea up and running again!
Isn’t this against Amazons T&C’s? I would have thought they’d suspend your account and keep the money as soon as you tried to withdraw it…
Hi Mike from HN,It ultimately depends on how you look at it. My book recommendation bot actually had quite the following prior to it being suspended. Many users did not find it too obtrusive (on account of the anti-spam measures I built in) and enjoyed the recommendations. As a result, I guess I was never reported.After all, I did go _4 months_ before Twitter even caught on.However, you are right. If I was just spamming random URLs to anyone and everyone under the sun, I would likely have my affiliate account suspended and have to forfeit the funds.
5 months leading up to Sept 09, I was making $5000-$7000 a month spamming twitter’s trending topics with eBay affiliate links and other affiliate links.
Was Sept 09 the end of days for you, too? Do you still operate? What was your conversion rate like?
nice work Charles but BookSuggest seems to be down for me. I wanted to see what it’d suggest for me :(
PS idea: tell us how much organic link juice you get from the headline of this article at some future stage??
Hi John,I looked into the bug you reported and it has been fixed. Give it another shot and see what you think.And yes, I’ll definitely follow up with a post on my analytics since writing this article :)
Very interesting
Would love to excerpt this article for the readers at blogonbooks.com. You cool with that?
Loved the article, good post
Hi Tim, as long as your article links back to this page and does not defame my person in any way then you are more than welcome to excerpt it at blogonbooks.com
Hi Claudio, thanks!
I ran book suggest on my account, and it came up with This Time Is Different: Eight Centuries of Financial Folly, which looks like something I really want to read. I think you got something there!
Yes, Sept 09 was the end of my Twitter spamming streak. I had bots creating Twitter accounts and they posted messages like “Look! I just won a $200 gift card *bitly link* *trending topic keyword*”, which would link to an email submit offer that paid $1-2 per email. Of the people who clicked, 5% converted, almost consistently.But Sept 09 was the end of it all because they started filtering out trending topic posts to only include users who had some account history. They also started to very quickly banned the new accounts my bot created.At first, I linked to eBay’s affiliate program, which paid, but not as well.I also built another bot that would create Twitter accounts with girl pictures. Then I found a list of porn stars on Twitter and used the API to gather a list of all the followers who followed porn stars. Then I would use those girl accounts to follow those people following porn stars and tried to get them to sign up for webcam shows. It didn’t work that well but it did make decent money over time.
Sounds like a great trick, but im surprised the uptake was so high, considering the suggestions were coming from an ‘untrusted’ source.Great story though.
Hi Christopher, I’m glad you enjoyed your recommendation!FC, oh, so *you’re* that guy. (I’m not sure, but I feel like my bot got one of those links one time ;) )Web developer, many of the recommendations were pretty good. Also, the tweet to the user “@user Have you read The Firm? <shortened>” invited conversation and interaction. There were periods of time where I would shut down the spam bot and talk to its followers about books. Many people seemed to really enjoy that and saw it more as a service than anything.
Nice article, but spamming and getting suspended doesn’t sound good
Is there more info on tf-idf somewhere?
@Charles Hooper, yeah, that was probably me or my friend :) My friend and I were the only people doing that on a large scale at that time.
Hi Frank, more information on tf-idf scoring can be found here:http://en.wikipedia.org/wiki/Tf%E2%80%93idfhttp://nlp.stanford.edu/IR-book/html/htmledition/term-frequency-and-weighting...
Too bad your spam scale wasn’t huge enough. You could have added a few more zeros there.
Great post. I can just imagine all kinds of programs that are currently active and being developed by people like you and FC to hack the systems. Seems to me this kind of development demand some awesome creativity and serious skills.
Thanks… that’s a nice geeky project. Inspires me