Tweet preview is no longer working on my instance

Some time ago Discourse stopped displaying the Twitter links properly as previews. I now only get an error message.

It seems to work for you guys. Why ever!

I am using the latest version. What could be the problem?

Example at meta:

On my instance:

1 Like

I am afraid this is not a bug.

In the past we carried a “simple” twitter embedder that relied on certain magic to generate the onebox. This had way too many edge cases and resulted in very uneven results, often breaking.

If any self hosters would like twitter embeds going forward, please follow:

All people hosted by CDCK use the CDCK accounts so they do not need to worry about configuring this.

2 Likes

Thank you Sam

But as I said, some time ago the function worked perfectly. Link in. Preview out.

I don’t want to associate a Twitter account with my instance. Nor do I want to blindly nod off a developer contract and commit to Twitter for whatever. And I certainly don’t want to use Twitter as a login.

1 Like

I hear you, but you got to take this up with Twitter, they gave us no option here. Html hacking to figure out info was too fragile

2 Likes

I hate this bullshit.

Update:

I followed the instructions to the end and set everything up successfully.

The tweets are still not displayed.

Only the link is displayed.

1 Like

Can you please confirm that you set both twitter consumer key and twitter consumer secret site settings and then tried to rebuild the HTML (post menu :gear: → Rebuild HTML button)?

Sorry for the frustration, but trust me I tried my best in finding a workaround. The problem is that Twitter no longer gives the information in a meaningful way for us to parse and display it. We found workarounds to get most of the information (eg. username, message, number of retweets, etc), but we could not find one for the quoted tweet, which is an important part of the tweet.

2 Likes

Everything is set up correctly.

As suggested, I also tried to rebuild the HTML view. Nevertheless, the link does not become a preview box.

Older tweets that I have put into posts in the past are still displayed. (Without HTML Rebuild)

1 Like

I just tested again with my Twitter keys and I confirm again that it works. All I did was to set the two site settings and rebuild the HTML. Then, the URL was rendered as a onebox.

Can you please rebuild Twitter API keys and try again? Make sure you do not mix the key and the secret.

1 Like

Hello,

I tried my best. The API keys (consumer keys) have been renewed. The HTML rebuild function did nothing. Everything is the same.

Only the link is displayed.

Some output inside the error log would be great.

I had this problem myself after trying to set this up today, and I happened to find this topic initially after searching and did not immediately see it mentioned in this topic yet; After searching other posts, for me, it had to do what the below linked posts say (use the elevated plan instead of the default essential plan), despite the wording on the Twitter site about reviewing your application, mine was approved instantly, and it worked fine immediately after.

4 Likes

Thanks heaps, I discussed this with @mcwumbly as well

Hoping we can add a warning to the admin dashboard when users are mistakenly on the essential plan, explaining the problem

3 Likes

Yeah! It works. :partying_face::partying_face::partying_face:

Special thanks to @popstarfreas :bouquet:

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.