diff options
author | Ross Burton <ross@linux.intel.com> | 2009-08-04 15:56:15 +0100 |
---|---|---|
committer | Ross Burton <ross@linux.intel.com> | 2009-08-04 15:56:15 +0100 |
commit | f8993177c3e1a9bce2cfcd9552ef4eb537b82c1f (patch) | |
tree | f4a287b8b6144ebd673b1fc203bc380b33e52cad /examples | |
parent | 70d0f6d17fd500d9c4a21951a5d46d3cb6b1cf85 (diff) | |
download | librest-f8993177c3e1a9bce2cfcd9552ef4eb537b82c1f.tar.gz |
Fix formatting and style for the twitter test
Diffstat (limited to 'examples')
-rw-r--r-- | examples/post-twitter.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/post-twitter.c b/examples/post-twitter.c index 5c477b8..385d4bd 100644 --- a/examples/post-twitter.c +++ b/examples/post-twitter.c @@ -40,14 +40,13 @@ main (int argc, char **argv) } /* Create the proxy */ - proxy = oauth_proxy_new ( - "UfXFxDbUjk41scg0kmkFwA", + proxy = oauth_proxy_new ("UfXFxDbUjk41scg0kmkFwA", "pYQlfI2ZQ1zVK0f01dnfhFTWzizBGDnhNJIw6xwto", "https://twitter.com/", FALSE); /* First stage authentication, this gets a request token */ if (!oauth_proxy_request_token (OAUTH_PROXY (proxy), "oauth/request_token", "oob", &error)) - g_error ("Cannot request token: %s", error->message); + g_error ("Cannot get request token: %s", error->message); /* From the token construct a URL for the user to visit */ g_print ("Go to http://twitter.com/oauth/authorize?oauth_token=%s then enter the PIN\n", @@ -58,7 +57,7 @@ main (int argc, char **argv) /* Second stage authentication, this gets an access token */ if (!oauth_proxy_access_token (OAUTH_PROXY (proxy), "oauth/access_token", pin, &error)) - g_error ("Cannot request token: %s", error->message); + g_error ("Cannot get access token: %s", error->message); /* We're now authenticated */ @@ -68,7 +67,7 @@ main (int argc, char **argv) rest_proxy_call_set_method (call, "POST"); rest_proxy_call_add_param (call, "status", argv[1]); - if (!rest_proxy_call_run (call, NULL, &error)) + if (!rest_proxy_call_sync (call, &error)) g_error ("Cannot make call: %s", error->message); /* TODO: parse the XML and print something useful */ |