Skip to content

Instantly share code, notes, and snippets.

@bumi
Created January 28, 2009 00:02
Show Gist options
  • Save bumi/53719 to your computer and use it in GitHub Desktop.
Save bumi/53719 to your computer and use it in GitHub Desktop.
on handle_string(tweet)
tell application "Keychain Scripting"
set twitter_key to first Internet key of current keychain whose server is "twitter.com"
set twitter_login to quoted form of (account of twitter_key & ":" & password of twitter_key)
end tell
set twitter_status to quoted form of ("status=" & tweet)
set results to do shell script "curl --user " & twitter_login & " --data-binary " & twitter_status & " http://twitter.com/statuses/update.json"
-- display dialog results
return nothing
end handle_string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment