Twitter API and REBOL, Deprecated

Twitter has turned off Basic Authorization, use the OAuth REBOL Twitter Client.

This REBOL client currently supports a few methods of the Twitter API:

do http://www.ross-gill.com/r/twitter-basic.r
? twitter

/As

Of these methods, only ‘find can be used anonymously.  You can set the user/password of subsequent requests using ‘as:

twitter/as "rgrebol" "twitter pass goes here"

/Find

‘find uses the search API.

twitter/find "REBOL"
twitter/find #Scotland

/Timeline

Returns a page of status updates for the current or specified user:

twitter/timeline
twitter/timeline/page 2
twitter/timeline/for "rebol3"

/Friends

Returns a page of status updates for the current user’s friends:

twitter/friends
twitter/friends/page 2

/Update

Send a status update with optional reply reference:

twitter/update "Working on REBOL projects!"
twitter/update/reply "Agreed!" #10147840233

Examples

Print some status updates:

foreach tweet twitter/timeline/for "rebol3" [
print ""
print tweet/created_at
print tweet/text
]

Get a complete timeline for the current user:

REBOL [
Title: "Twitter Export"
Date: 31-May-2010
]

do http://www.ross-gill.com/r/twitter.r
; twitter/as "user" "pass" ; optional login

twitter-export: func [
for [string!] /timeout time [integer! time!]
/local result page content
][
result: copy []
page: 1

while [
not empty? content: twitter/timeline/for/page/size for page 100
][
append result content
page: page + 1
wait any [time 10] ; time between request, adjust as required
]

result
]

timeline: twitter-export ask "Export timeline for? "

See Also: