Tag Archives: marketing

I was a bit hesitant to post this script since it is such a powerful marketing tool that it could be used very badly in the hands of a spammer. The basic premise is to directly respond to someone’s tweet if they mention your product or service. So for example I might want to have a tweet that goes out directly to someone who mentions twitter and python in a tweet and let them know about this blog. This will accomplish the same thing as the TwitterHawk service except you won’t have to pay per tweet.

To do this I had a choice. I could use a service like TweetBeep.com and then write a script that responded to the emails in my inbox, or I could use the Twitter Search API directly. The search API is so dead simple that I wanted to try that route.

The other thing to consider is that I don’t want to send a tweet to the same person more than once so I need to keep a list of twitter users that I have responded to. I used pickle to persist that list of usernames to disk so that it sticks around between uses.

The query functionality provided by the Twitter Search API is pretty cool and provides much more power than I have used in this script. For example it is possible to geo-target, lookup hashtags, or reply tweets. You can check out the full spec at http://apiwiki.twitter.com/Twitter-API-Documentation

Lastly, to keep it a bit simpler I’m ignoring the pagination in the search results and this script will only respond to the first page worth of results. Adding a loop per page would be pretty straight forward but I didn’t want to clutter up the code.

Example Usage:

>>> import tweetBack
>>> tweetBack.tweet_back('python twitter', 'Here is a blog with some good Python scripts you might find interesting http://halotis.com', 'twitter_username', 'twitter_password')
@nooble sent message
@ichiro_j sent message
@Ghabrie1 sent message

Here’s the Python Code:

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# (C) 2009 HalOtis Marketing
# written by Matt Warren
# http://halotis.com/
   import json as simplejson
   import simplejson  # http://undefined.org/python/#simplejson
import twitter     #http://code.google.com/p/python-twitter/
import urllib
import pickle
TWITTER_USER = 'username'
USER_LIST_FILE = 'tweetback.pck'
#read stored list of twitter users that have been responded to already in a file
    f = open(USER_LIST_FILE, 'r')
    user_list = pickle.load(f)
    user_list = []
def search_results(query):
    url = 'http://search.twitter.com/search.json?q=' + '+'.join(query.split())
    return simplejson.load(urllib.urlopen(url))
def tweet_back(query, tweet_reply, username=TWITTER_USER, password=TWITTER_PASSWORD):
    results = search_results(query)
    api = twitter.Api(username, password)
        for result in results['results']:
            if result['from_user'] not in user_list:
                api.PostUpdate('@' + result['from_user'] + ' ' + tweet_reply)
                print '@' + result['from_user'] + ' sent message'
        print 'Failed to post update. may have gone over the twitter API limit.. please wait and try again'
    #write the user_list to disk
    f = open(USER_LIST_FILE, 'w')
    pickle.dump(user_list, f)
if __name__=='__main__':
    tweet_back('python twitter', 'Here is a blog with some good Python scripts you might find interesting http://halotis.com')

Update: thanks tante for the simplejson note.

Just a quick link to post.

Dr. Harlan Kilstein is an NLP practitioner that specializes in using NLP techniques to make your copywriting sing.  He’s currently in the middle of a 30 day video series that is packed with useful tips about how to write better copy.

If you haven’t heard of NLP you are missing out. It’s a fascinating subject and the implications are simply amazing.

This is just one of the videos:

I’ve been devouring all of the videos on his site for the last few days… it’s a real goldmine of information. His site is NLPCopywriting.com

When it comes to getting your business profitable the 80/20 rule can be used as a guide to determine how you should manage your time.

What is the most important part of any new business?


Time and time I’ve had to learn and relearn this while trying to get HalOtis profitable. I spent time working on designing the logo, getting business cards printed, having a custom t-shirt made, and working on products before actually proving that there was a market that I could sell to. What was I thinking!

All of that time was wasted.

Let’s look at some examples of how to do it properly:

Blog Posting
If you had spent 1 hour writing a post for one of your blogs, then you should spend 4 hours promoting it. Take the time to socially bookmark your post, leave comments on other sites for the link back, and perhaps write some more articles, Squidoo lenses, or post to other web 2.0 sites. Spread the word far and wide that you have something worth reading.

Internet Marketing
If you want to get into a particular market get to the selling as soon as possible. If you take a day to find a niche, build a website, and find a product to sell on it. Then spend the rest of the week only on sales. Drive traffic to the site, test the conversion of different pages designs, tweak the copywriting. If you can’t sell someone else’s product if you put in that amount of effort then consider finding another niche.

Resist the temptation to build up your business. Don’t start by getting the accounting software, designing logos, getting letterhead, talking to lawyers, or doing the paperwork to register your business. Skip those things and develop a plan that will get you to the Selling part as soon as possible. You can get creative about this. Take pre-sales whenever possible and focus your effort on getting them. 90% of businesses fail in the first year… mitigate your risk by making sure the business will make money before investing in it.

This approach will have a much better success rate. If you want to be in business, and get rich, you must get over any hangups you have about sales and selling. In fact you should come to love sales.

Sales is the one place where you actually get to use that fun stuff you learned about in Psychology class. It’s a ridiculously interesting area to be an expert in, and the money is pretty good too. If you know how to make sales, then you’ll be an asset to every business you work for (or your own).

I’ve been learning a lot about copywriting lately by listening to some of the world’s best copywriters namely John Carlton, and Gary Halbert. I’ve read a number of books on the subject of sales and selling and marketing. Though I wouldn’t consider myself to be a good copywriter I have developed a sense of what qualifies as good.

Why is it that telemarketers have the lamest scripts of all. Someone must be the professional copywriter that pens those things before handing them to the people that actually do the calls. It’s as if they’ve broken every rule about good marketing. I hope they get fired.

The last telemarketing call I got was for an identity protection program that costs $15/month. The script was lame, uninteresting, and felt like they were taking my attention and wasting it. It was 5 long minutes that I’ll never get back.

If I were writing the copy for such a sale it would go something like this:

Hello, I’m looking for [First name]

Hi Mr/Ms [Lastname] I’m [callers first name] calling on behalf of [business name]. Have you heard of Identity Theft?

Identity theft is a growing threat that many of our customers are worried about and I want to share with you some FREE TIPS that you can do right now to help protect yourself against identity theft. We value you as a customer and it’s in our best interest as well as yours to prevent identity theft. I have FOUR really simple things that you can start doing today to reduce your risks.

First, when you’re throwing bills, receipts and invoices in the garbage, make sure you use a paper shredder. Identity theives can get a lot of information about you from your garbage, names, addresses, phone numbers, and bank account information found in the garbage could be used to create fake documents and steal your identity.

Second, only buy things online from reputable sites. Ensure that the page you punch your credit card information into is encrypted and that you trust the site to be able to keep your information safe. Hackers have on several occasions over the last years broken into website databases and downloaded hundreds of thousands of credit card numbers. Making many accounts vulnerable to fraudulent charges.

Third, use cash. Recently sophisticated criminals have been swapping out point of sale keypads for ones that have been modified to record all the card information that gets swiped. Make sure that credit card and bank card keypads are either fixed to the counter or have another way that would prevent someone from switching keypads.

Lastly, [business name] is offering its GOOD customers a program that will actively search for fraudulent charges, and newly issued credit cards under your name among other things in order to keep your identity under your control. Since starting this program we’ve identified [insert number] identity thefts in progress before any damage was done to our customers. We’ll also throw in a copy of your credit report and give you a consulting call with a credit expert so you can ask questions about improving your credit score, or anything else regarding your credit score or report. We’re offering this today FREE for the first 60 days and after that we’ll have to charge you $14.95 per month because it’s not easy to stay one step ahead of the criminals and we have an excellent team devoted to keeping you safe. If you’re interested, I’ll just have to confirm your address so we can send you your free information package in the mail which should arrive by [5 business days from today]

Can I confirm your mailing address and get this sent out to you today?

Hell, I might have bought it with that script.