Twitter oneboxes now require Twitter credentials

AI-generated summary

Discourse has updated its Twitter onebox functionality due to changes in Twitter’s policies. Previously, oneboxes were generated by crawling webpages or using the Twitter API, but Twitter’s recent changes have made webpage crawling ineffective, so the first method is no longer supported. Twitter oneboxes will continue to work only if the site uses the Twitter API. Sites hosted by CDCK on Business or higher plans, or those with twitter consumer key and twitter consumer secret settings, are unaffected. For other sites, users must generate Twitter API keys and configure Discourse to use them, without enabling Twitter logins. The update applies to Business and Enterprise plans, and the original post has been updated to reflect this. Instructions are available at Configure Twitter Login and Rich Embeds for Discourse.

In the past, Discourse obtained the information necessary for rendering Twitter oneboxes by either crawling the webpage or using the Twitter API. Due to the recent changes made by Twitter, we can no longer get all the information we need from crawling webpages and had to drop support for the first method. Twitter oneboxes will continue to work as long as you are using the Twitter API.

How do Twitter oneboxes look?

Here is an example onebox of https://twitter.com/discourse/status/1557506046087680000

Does this change affect you?

This change affects only sites that are not using Twitter API for fetching oneboxes (Twitter preview). If your site is hosted by CDCK on a Business plan or higher, or it has twitter consumer key and twitter consumer secret site settings set, your site is not affected.

How can I fix this?

Follow the guide for generating Twitter API keys and set up Discourse to use them, but skip changing the “enable twitter logins” site setting:

21 Likes

Thanks. Bookmarked. :smiley::+1:

2 Likes

2 posts were split to a new topic: Twitter oneboxes are no longer working on my install

Just to note, due to the API usage cap in place this is now applicable to our Business and Enterprise plans, and the OP has been edited to reflect this. For those on Basic or Standard hosting who still want to support this feature you will need to follow these instructions to obtain an API key:

2 Likes