Can't connect Twitter account
Getting a 500 error when trying to connect a new Twitter account in prod.
Just an idea, maybe related with Twitter closing their API?
The situation:
- Twitter suspended our main OC App because we were still using V1 endpoints.
- They didn't send a notice before suspending, but they did send a notification that was missed by the team.
- As a result, we're not letting people connect their Twitter accounts since
Fri, 14 Apr 2023 at 10:59 PM - Existing connections were not broken at this point, but since they're using Twitter V1 they're ultimately going down too (Sentry seems to imply that multiple of them, if not all, are already out)
Proposal for next steps:
- [x] Disable Twitter in "Connected Accounts". Add a small message to explain that we're impacted by Twitter's recent API changes, and we're working on it.
- [x] Move to Twitter OAuth v2 with https://github.com/superfaceai/passport-twitter-oauth2 (or, alternatively, only rely on the lib suggested in (3), which also includes the OAuth part)
- [x] Move Twitter API calls to V2 using https://www.npmjs.com/package/twitter-api-v2
- [x] ~~Ask Twitter to re-enable our existing App~~ (not possible)
- [x] ~~Re-enable Twitter in the settings~~
- [x] Create a new App
- [x] Update credentials in Prod
- [x] Disconnect all existing Twitter Apps
- [ ] Send a message to users whose apps have been suspended by Twitter to ask them to reconnect their Twitter accounts
I've been asked whether we should prioritise this asap, so I'm explaining my decision making process. TLDR: collectives are using it as intended, and usage is remaining steady, so we should fix the feature.
As far as I can see, connecting an account on twitter offers two benefits to collectives and users:
- it brings communities to the spaces where collectives are talking about their work
- it welcomes new contributors into the community automatically
In the knowledge that twitter is currently circling the drain the question is, are users still using it? And the answer is quite interesting.
Currently there are 3393 connected accounts, and they have been in decline steadily since the feature was rolled out:
But there's a huge bias in this data, driven by the near complete drop in connections by users in April 2020:
As of today only 1/3rd (1200) of accounts are linked to users, while 2/3rds are linked to collectives, events and projects. This is fine, it's primarily collectives that we want to cater for, and the data shows they are indeed using the feature and there's a steady growth in usage, growth that tracks only marginally below the small increase we see in registered collectives each month:
All this leads me to believe that we should update the API at some point ✌️
This week:
- [x] Start migrating Twitter OAuth to V2
This week:
- [x] Complete & merge https://github.com/opencollective/opencollective-api/pull/9248
- [x] Start moving API calls to V2
This week:
- Same goals as last week (got good progress on the 1st one)
Unfortunately, we won't be able to re-activate our existing Twitter App - Twitter explicitly says to create a new one and there's no way to contact their support about this topic anymore.
I've updated the plan in https://github.com/opencollective/opencollective/issues/6870#issuecomment-1637979154 accordingly and will add a migration in https://github.com/opencollective/opencollective-api/pull/9248 to deactivate all existing Twitter integrations.
- [ ] @znarf to contact users to re-connect their accounts (if needed)
@znarf I can follow-up on contacting users if it hasn't been done yet
Proposed email message:
Subject: Reconnect your Twitter account on Open Collective
Dear [User Name],
I'm Benjamin Piouffle, an Engineer at Open Collective. I'm writing to inform you that you need to reconnect your Twitter account to your Open Collective profile due to recent Twitter API changes.
This is a quick and easy process, and you can do so by following these steps:
- Go to your Open Collective profile
- Click on the "Admin Panel" button
- Click on the "Connected Accounts" tab
- Click on the "Connect" button in the Twitter section
Once you've reconnected your Twitter account, you'll be able to continue to share your Open Collective profile and updates with your followers on Twitter.
We apologize for any inconvenience this may cause.
Thank you, Benjamin Piouffle Engineer, Open Collective
Subject: Reconnect your X (Twitter) account on Open Collective
Dear [User Name],
I'm Benjamin Piouffle, an Engineer at Open Collective. I'm writing to inform you that you will need to reconnect your Twitter account to your Open Collective profile because of recent X (Twitter) API changes.
This is a quick and easy process, and you can do so by following these steps:
Go to your Collective's profile page Click on the "Admin Panel" or "Dashboard' button Click on "Settings" Click on the "Connected Accounts" tab Reconnect your X (Twitter) account
Once you've reconnected your X (Twitter) account, you can continue to share your Open Collective profile and updates with your followers on X (Twitter).
We apologize for any inconvenience this may cause.
Thank you, Benjamin Piouffle Engineer, Open Collective
Should we change Twitter to X in the connected accounts section?
Few small changes from John's copy adds :)
Subject: Reconnect your X (Twitter) account on Open Collective
Dear [User Name],
I'm Benjamin Piouffle, an Engineer at Open Collective. I'm writing to inform you that you will need to reconnect your X (Twitter) account to your Open Collective profile because of recent X API changes.
This is a quick and easy process, and you can do so by following these steps:
Go to your Collective's profile page Click on the "Admin Panel" or "Dashboard' button Click on "Settings" Click on the "Connected Accounts" tab Reconnect your Twitter account
Once you've reconnected your X account, you can continue to share your Open Collective profile and updates with your followers on X.
We apologize for any inconvenience this may have caused. If you have any further issues after doing this, please contact us here. (https://opencollective.com/contact)
Thank you, Benjamin Piouffle Engineer, Open Collective
moved this into current cycle so it doesn't get left behind. Please close out once contacted @Betree @shannondwray ✌️
Just to note there was one user that had problems connecting with their Twitter Account; https://opencollective.freshdesk.com/a/tickets/294117 after these new changes. We don't know the exact cause yet or I haven't been able to reproduce so I'll keep a lookout for other such issues and if we manage to get more info open an issue.
Another report of not being able to connect twitter; https://opencollective.freshdesk.com/a/tickets/294117.
I noticed that there's another bunch of users complaining about this at, https://opencollective.com/opencollective/updates/updated-x-ex-twitter-integration-action-required
To clarify the situation, there's still an issue with some of the accounts. The error is quite random and seems related to how our server handles cookies in production. I'm exploring solutions at https://github.com/opencollective/opencollective-api/pull/9526 as a secondary priority.
+1
Problem still existed
For folks following this issue, I'm sorry to announce that we're dropping the X integration. This decision only affects the functionality that automatically posts updates or activity to X through our platform. You can still link your X handle to your profile (from Dashboard > Settings > Info) - this change does not impact that capability.
Why are we making this change?
- The feature has become increasingly challenging to maintain due to persistent bugs and unreliable performance.
- It’s difficult to justify supporting X exclusively when we don’t offer similar integrations for other popular platforms, like Mastodon.
- Ensuring parity across platforms would require more investments, which we believe are better allocated to developing platform-neutral tools like webhooks that benefit everyone.
What’s Changing?
- No New Connections: Soon, you will no longer be able to connect new X accounts
- Phasing Out Existing Connections: Current integrations will remain active for now, but they will eventually be removed. We will notify you well in advance to allow for a smooth transition.
Next Steps If you’ve been relying on the integration, we recommend exploring Webhooks as an alternative. Webhooks can automate updates to X and other platforms via tools like N8n, Huginn or Zapier. You can find the Webhooks documentation here.
We value your feedback and would love to hear about your use cases. Please share your thoughts in our GitHub discussion or join the conversation on our Discord chat.