Rebol [ Title: "Rebol Twitter" Author-Url: http://reboltutorial.com/blog/rebol-twitter-update/ Script-Url: http://reboltutorial.com/source/rebol-twitter.r Date: 23-Aug-2009 Purpose: { Tweet from Rebol - Multiple Accounts support } ] do http://reboltutorial.com/source/http-tools.r accounts: copy [] tweetaccount: func[user password message][ tweetuser: user tweetpassword: password if none? (select accounts user) [ append accounts user append accounts password ] http-tools-data/username: user http-tools-data/password: password message-block: copy [] append message-block "status" append message-block message http-tools/post http://twitter.com/statuses/update.json message-block ] tweet: func [message][ if not (value? 'tweetuser) [ tweetuser: ask "user: " tweetpassword: ask "password: " ] tweetaccount tweetuser tweetpassword message ] link: func[url][ content: read url parse content [ thru copy title to thru to end ] if ((length? title) > 120) [ parse title [ [to "-" thru "-" | ] copy title to end ] ] if ((length? title) > 120) [ title: rejoin [copy/part title 117 "..."] ] tweet rejoin [title " " url] ] ch: func[user [string! unset!]][ if (not value? 'user) [ tweetuser: ask "user: " ] if/else none? (select accounts user) [ tweetuser: user tweetpassword: ask "password: " append accounts tweetuser append accounts tweetpassword ][ tweetuser: user tweetpassword: first select accounts user ] ]