On trying to use the 7.x-3.x-dev version with Identi.ca, Add Twitter account in user/edit gives

Bad Request
No oauth_token parameter provided.

and on returning to site the warnings on the config page say
Notice: Undefined variable: response in TwitterOAuth->get_request_token() (line 289 of var/www/dev/sites/all/modules/twitter/twitter.lib.php).
Notice: Undefined index: oauth_token in TwitterOAuth->get_request_token() (line 290 of /var/www/dev/sites/all/modules/twitter/twitter.lib.php).
Notice: Undefined index: oauth_token_secret in TwitterOAuth->get_request_token() (line 290 of /var/www/dev/sites/all/modules/twitter/twitter.lib.php).
Notice: Undefined index: oauth_token in TwitterOAuth->get_authorize_url() (line 296 of /var/www/dev/sites/all/modules/twitter/twitter.lib.php)

Comments

agileox’s picture

I get the same problem. I have successfully set up the twitter module twice with same versions and same settings (except with a different twitter account) on other sites on the same server and never ran into this before. Cannot add a twitter account to a user.

juampynr’s picture

Guys, if you just want to pull tweets from an account, you do not need Oauth. Please try disabling oauth_common and then try again.

rabisg’s picture

In my case, OAuth is required as it involves posting to identi.ca too
any suggestions where we might start looking?

this is the url that is being sent
https://identi.ca/api/oauth/authorize?oauth_token=

juampynr’s picture

You can also install XDebug and configure it to trace everything that happens during the request.

See http://xdebug.org/docs/execution_trace

agileox’s picture

@rabisg
Make sure you are using the Consumer Key and Consumer Secret that is listed under OAuth Settings on dev.twitter.com and NOT THE ACCESS TOKEN AND SECRET.

rabisg’s picture

@agileox
Twitter's working fine. Identi.ca is causing the problem
And im sure im using the right key because i could get it authenticated using a standalone twitter library modified to use Identi.ca

rabisg’s picture

I think i've figured out the problem. Identi.ca's API does not seem to be working with relative urls like http://example.com/?q=twitter/oauth which it recognizes as invalid URL and thus it returns invalid callback error. Clean URLs work fine.

juampynr’s picture

Title: Bad OAuth Request » Bad OAuth Request when authenticating against Identi.ca

@rabisg? Does your last comment then fixes the issue. Then please set it as fixed.

rabisg’s picture

Status: Active » Fixed
juampynr’s picture

Great stuff. Do let me know if you need further help.

rabisg’s picture

Thanks jaumpy.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.