From 83834f802ae3fcf277c53746d2b4c487cd7dc21f Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Fri, 13 Feb 2009 20:20:22 -0600 Subject: [PATCH] Fixing twitter --- extra/twitter/twitter.factor | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/extra/twitter/twitter.factor b/extra/twitter/twitter.factor index d70828b310..48388de382 100644 --- a/extra/twitter/twitter.factor +++ b/extra/twitter/twitter.factor @@ -27,8 +27,7 @@ MACRO: keys-boa ( keys class -- ) : set-request-twitter-auth ( request -- request ) twitter-username get twitter-password get set-basic-auth ; -: twitter-request ( string quot -- data ) - [ twitter-url ] dip call +: twitter-request ( request -- data ) set-request-twitter-auth http-request nip ; inline @@ -101,10 +100,11 @@ PRIVATE> [ "status" set twitter-source get "source" set - ] make-assoc ; + ] H{ } make-assoc ; : (tweet) ( string -- json ) - update-post-data "update" [ ] twitter-request ; + update-post-data "update" twitter-url + twitter-request ; PRIVATE> @@ -117,7 +117,8 @@ PRIVATE> ] twitter-request json>twitter-statuses ; + twitter-url + twitter-request json>twitter-statuses ; PRIVATE>