Revision "a" of OAuth 1.0 mandates the presence of "oauth_callback"
parameter.
Usually libraries appends an "oob" (Out of Band) oauth_callback if you
don't provide a valid callback url, and don't specify that you don't
want "OAuth 1.0a".
But apparently our library of choice for OAuth (liboauth) does not do
this, though the code is in library but commented out.
src/oauth.c:675-680 (as in HEAD, and 0.9.0 tarball):
675 #if 0 // oauth_version 1.0 Rev A
676 if (!oauth_param_exists(argv,argc,"oauth_callback")) {
677 snprintf(oarg, 1024, "oauth_callback=oob");
678 oauth_add_param_to_array(argcp, argvp, oarg);
679 }
680 #endif
So for now, we have to add this to our request_token URI.
static const char twitter_request_token_uri[] = "http://twitter.com/oauth/request_token";
static const char twitter_access_token_uri[] = "http://twitter.com/oauth/access_token";
static const char twitter_authorize_uri[] = "http://twitter.com/oauth/authorize?oauth_token=";
-static const char identica_request_token_uri[] = "http://identi.ca/api/oauth/request_token";
+static const char identica_request_token_uri[] = "http://identi.ca/api/oauth/request_token?oauth_callback=oob";
static const char identica_access_token_uri[] = "http://identi.ca/api/oauth/access_token";
static const char identica_authorize_uri[] = "http://identi.ca/api/oauth/authorize?oauth_token=";
{
char *post_params = NULL;
char *request_url = NULL;
- char *reply = NULL;
+ char *reply = NULL;
char *at_key = NULL;
char *at_secret = NULL;
char *verifier = NULL;