Twitter integration not working

Sim

Well-known member
After a report from a user that they couldn't log in via Twitter, I confirmed I was having the same difficulty.

I checked my Twitter app settings and tried resetting the keys, but still getting the error. It also fails the Tools > Test Twitter Integration test.

This is happening on multiple sites (v 1.5.19 & 1.5.21).

Error message is as follows:

Whoa there!
The request token for this page is invalid. It may have already been used, or expired because it is too old. Please go back to the site or application that sent you here and try again; it was probably just a mistake.​
 
Just tried to associate my Twitter profile with my account here on xenforo.com and received the following error:

1529299810929.webp

So perhaps something has changed on Twitter's end?
 
Last edited:
Just tried to associate my Twitter profile with my account here on xenforo.com and received the following error:

View attachment 178139

So perhaps something has changed on Twitter's end?
I created a ticket about this yesterday, and was told of one potential solution (I haven't tested if it works yet):

Delete the Twitter app from Twitter's developer portal, and re-create it. Insert the new client and secret keys into XF settings.

I rather not do that though unless absolutely necessary... because wouldn't that mean all the existing Twitter account associations with the forum are lost, and users would need to re-auth the Twitter app and associate their accounts again? That's a hurdle I would like to avoid.
 
I have just tested with a newly made app and it works as expected for me.

If someone would like to open a ticket with your admin and twitter logins if it is still failing for you, we can look into if something is going on that isn't obvious on our test installs.
 
@Slavik do you have your Twitter login associated with your xenforo.com user account? Can you log in with it? I can't log in with my Twitter account here at the moment.
 
I've just fixed it here. The callback URL for our app was http://xenforo.com.

Clearly that's fairly legacy; we've been on https for ages and the callback URL for Twitter in XF2 is connected_account.php. Despite that, it has obviously been working for quite some time.

I updated it to https://xenforo.com/community/connected_account.php and it works fine.

For the people having issues, what do you have your callback URLs set as?
 
So for XF1:
  • Website: <board url>
  • Callback URL: <board url>/register/twitter
  • Callback URL: <board url>/admin.php?tools/test-twitter
Is that correct?

(Edit: added 2nd callback URL as per @rdn's suggestion below - confirmed that these setting work for XF1)
 
Last edited:
So for XF1:
  • Website: <board url>
  • Callback URL: <board url>/register/twitter
  • Callback URL: <board url>/admin.php?tools/test-twitter
Is that correct?

(Edit: added 2nd callback URL as per @rdn's suggestion below - confirmed that these setting work for XF1)
Also add this callback: /admin.php?tools/test-twitter
Thanks - that did the trick ... test works, and associating my Twitter account with my profile also works again and I was able to log in to my forum using my Twitter account.
Same here. Finally after some considerable time, this now works perfectly for us. Both with registering and when logging in. Thanks for the tip!
 
Top Bottom