From b29f98f64f1e75f865b72e45795b5d84e717fb86 Mon Sep 17 00:00:00 2001 From: Gabor Adam Toth Date: Tue, 23 Feb 2010 13:32:23 +0100 Subject: [PATCH] http/server: success/failure message for /oauth --- world/net/http/server.c | 5 +++++ world/net/twitter/client.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/world/net/http/server.c b/world/net/http/server.c index 30affb7..06d55dd 100644 --- a/world/net/http/server.c +++ b/world/net/http/server.c @@ -178,12 +178,17 @@ case "/static/": break; case "/oauth": object oauth; + http_ok(version); //PT((">>> shm: %O\n", shared_memory("oauth_request_tokens"))) if (query["oauth_verifier"] && (oauth = shared_memory("oauth_request_tokens")[query["oauth_token"]])) { //PT((">>> oauth: %O\n", oauth)) oauth->verified(query["oauth_verifier"]); m_delete(shared_memory("oauth_request_tokens"), query["oauth_token"]); + write("OAuth succeeded"); + } else { + write("OAuth failed: token not found"); } + quit(); return 1; } switch (file[1]) { diff --git a/world/net/twitter/client.c b/world/net/twitter/client.c index 3cd84e5..3f8c01c 100644 --- a/world/net/twitter/client.c +++ b/world/net/twitter/client.c @@ -1,3 +1,8 @@ +/* twitter client + * + * - register @ http://twitter.com/apps + * - then in local.h #define TWITTER_KEY & TWITTER_SECRET + */ #include inherit NET_PATH "http/oauth";