Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Twitter: added proper implementation of 'tweet' cmd.

  • Loading branch information...
commit 1384246d8faa211191f95a7425e3bc077f986988 1 parent 5bb0149
@akoprow akoprow authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/twitter.opa
View
5 src/twitter.opa
@@ -94,7 +94,8 @@ Please re-run your application with: --twitter-config option")
private function tweet(state, content) {
match (state) {
case {authenticated: creds}:
- Service.respond_with(<>Unimplemented...</>)
+ tweet = TW.post_status(content, "", creds)
+ Service.respond_with(<>Tweeted: <em>«{tweet.text}»</></>)
default:
authenticate()
}
@@ -106,7 +107,7 @@ Please re-run your application with: --twitter-config option")
id: "twitter",
description: "Managing Twitter account",
cmds: [
- { cmd: "tweet [content]", description: "Publishes a given tween" }
+ { cmd: "tweet [content]", description: "Publishes a given tweet" }
],
},
function parse_cmd(state) {
Please sign in to comment.
Something went wrong with that request. Please try again.