

Tweetscript is a simple yet powerful way to build smart tweets. A smart tweet is dynamic. It allows you to construct simple or complex rules to create database-driven tweets.
Whenever one of these dynamic tweet is tweeted, it will use the rules you specify with tweetscript to build your message: this will result in new, unique tweets each and every time you reuse the same message.
Every tweetscript command should be enclosed in [brackets].
When we detect that one of your tweets uses tweetscript, we include a little "test" icon that lets you experiment and see an example of the resulting tweet without actually tweeting it!
This feature helps you build re-usable tweets that let you customize and personalize common tweeting tasks. We will be adding more rules-based syntax soon. Please note, we are firmly against Twitter spam, and we ask that you read and conform to our Rules of the Road, as well as Twitter's Terms of Service.
Do not use our system to send duplicate tweets (or tweets that closely resemble one another). As we adhere to Twitter's Terms of Service, we require that all tweets sent through our system are substantively different. This means: do not use Tweet Spinner to send duplicate tweets. Fortunately, tweetscript offers you the ability to customize and personalize rules-based tweets. However, do not use our language to "sneak past" the duplicate tweets limitation by changing one or two words for each tweet. Please ensure that your tweets are timely, topical, spam-free, substantively different from one another, and enhance the Twitter experience for readers (rather than contributing to tweet "pollution").

Tweetscript uses lists of words/sentences that you create. To access the lists, click on the "show/edit lists" button in the Smart Tweets section.

Create a new list there.

Create a tweet that references your new list. Use [listname] to reference the list (where you change "listname" to the name of the list you created. Click on the green checkmark to the right of the tweet. This will show you a TEST of the tweet. (It will NOT tweet it to Twitter.)

The above is an example of the test tweet function. It is helpful for debugging your tweetscript.
There is a lot more power and flexibility to tweetscript beyond this simple example. Please keep reading to learn what other powerful things you can do with tweetscript!
| [sushi|roast beef|cabbage] |
| Randomly return one of the words in the command. Separate each word (or phrase) with "|". |
| [listname] |
| You can create your own lists at the bottom of the page. Each list can contain as many keywords or phrases as you like. Then, if you include [listname] (IMPORTANT: replace "listname" with the name that you use for your list!) in your tweet, it will randomly select one element from the list. |
| [listname(5)] |
| This will return the 5th element in the list. (The first element in the list is "1"). |
| [listname(next)] or [listname(+)] |
| This will return the next element in the list. It will cycle back to the first element when the list is complete. |
| [listname(last)] or [listname(-)] |
| This will return the element that was most recently returned from the list. This is a useful way to repeat the same selected word a few times. |
| [listname(50%)] |
| This will only pull a word from listname 50% of the time. This is a great way to include randomly selected keywords only some of the time. |
| [[listname]] |
| This is a powerful technique. It will first call "listname" and randomly grab an element. It will then use that element to try to call a list by that name and randomly select an entry. Note that lists themselves may contain tweetscript. So you can create powerful cascades. |
Randomly tweets a particular feature of tonight's show.
A similar way to do the previous, yet using lists (create a list called "standardfeatures"). For example:
List "standardfeatures" contains:
Here we walk through a list called "guestlist" which contains a list of guests. Each time this tweet is called, the next entry in the list will be returned. For example:
List "guestlist" contains:
This is a complex example. This will walk through "guestlist" as before. But something different happens. Here's what guestlist looks like:
List "guestlist" contains:
List "billmurray" contains:
In [[guestlist(+)](1)], the (1) part returns the first element of the list ("Bill Murray"). Then, [[guestlist(last)](2)] uses "last" to refer to the same list that is being used, and (2) to call the second element of the list ("his latest movie clip").
As you can see, this is a powerful way to assemble dynamic, rules-based tweets that are database driven.
See if you can piece together what will happen in this case...
List "tonight" contains:
![]() |
|
© Copyright 2009-2010, Tweet Spinner, Portland, Oregon, USA. – Contact us at support (at) tweetspinner.com or @tweetspinner. –
Yes, we have an affiliate program. –
Privacy Policy: Your information is confidential and is shared with no one. –
Use of our site signifies your acceptance of our Terms & Conditions. –
We are not affiliated with Twitter.com.
|