It took me a while to figure out. To enable logging in via Twitter, one should set the callback URL in the Twitter API settings to 'hybridauth/endpoint'.

Comments

rwohleb’s picture

Assigned: Unassigned » rwohleb

Good catch. Documentation is usually the last thing to get done, unfortunately :)

I'm not dead, just super busy. I'm hoping to get back on track with this module this weekend.

azin’s picture

Has anything changed with Twitter in Version 2? With the latest Hybridauth and Twitter login, I cannot login but get

Notice: Undefined index: oauth_token in OAuth1Client->requestToken() (line 84 of /var/www/html/sites/all/libraries/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php).
Notice: Undefined index: oauth_token_secret in OAuth1Client->requestToken() (line 84 of /var/www/html/sites/all/libraries/hybridauth/Hybrid/thirdparty/OAuth/OAuth1Client.php).

It is a fresh install, with just Drupal and Hybridauth + Ctools and Libraries

duozersk’s picture

azin,

It looks like you didn't set the needed keys to work with Twitter, check the settings for this provider at HybridAuth admin pages.
I have just tested login through Twitter and it works fine (with hybridauth 7.x-2.x).

Thanks
AndyB

azin’s picture

Exactly the same issues - with both Twitter and LinkedIn. I copied everything from HybridAuth 1.x so settings should be correct.

azin’s picture

@AndyR, re-checked everything Google and Facebook work fine, Twitter and LinkedIn not - I can send you the URL and passwords by private message if you want.

duozersk’s picture

azin,

Yes, please send me links and login info to try and check it, if possible. And I think that we should move this issue to another one as it is definitely different from the initial one about the documentation.

Thanks
AndyB

arrubiu’s picture

But is there a callback on this module to set on dev.twitter?

duozersk’s picture

Sergio,

Can you please explain what you need? What is the dev.twitter and what callback do you expect to have?

PS. and again, it sounds like completely separate issue, right?

Thanks
AndyB

duozersk’s picture

Status: Active » Closed (cannot reproduce)

Guys,

I'm going to close this issue. For the initial request - I have just checked it - there is no need to specify Callback URL in the Twitter application settings, it works just fine without it (or with it pointing just to the domain without 'hybridauth/endpoint' part).

For the azin's issue - I believe we have resolved it in a separate issue and there was something about timezone handling and having correct time set on the server.

Thanks
AndyB

amourow’s picture

Version: 7.x-1.x-dev » 7.x-2.6
Status: Closed (cannot reproduce) » Needs review

I can't login with twitter recently.
Then I find User guide about Twitter on official site of Hybridauth Library.

It does need a callback url, http://mywebsite.com/path_to_hybridauth/?hauth.done=Twitter

In this case, I entered http://example.com/hybridauth/?hauth.done=Twitter, which is similar to google, then it works.

duozersk’s picture

Version: 7.x-2.6 » 7.x-2.x-dev
Assigned: rwohleb » duozersk
Status: Needs review » Needs work

amourow,

"needs review" status assumes you have uploaded a patch for review. Setting to "needs work" then. I feel adding a few lines to the README.txt would be enough to close this.

Thanks
AndyB

duozersk’s picture

Status: Needs work » Closed (fixed)

Fixed with http://drupalcode.org/project/hybridauth.git/commit/e121eb5 - added Troubleshooting section to README.txt.

Thanks
AndyB