XF 2.3 Twitter (X) no longer auto embedding?

nodle

Well-known member
Just wondering what I am missing here. I was using S9 media sites for my media, but uninstalled it this morning and removed the files. Then I rebuilt the caches for embeds. But when I copy and paste a link from Twitter it only shows the link and no longer auto embeds (I did check auto embeds under the admin and it is enabled). But when I make a test post on Xenforo's test forum it works just fine. What am I missing here?
 
What do you mean by "rebuilt the caches for embeds" ?

Does the media bb code appear under admin.php?bb-code-media-sites/ ?

If not, you need to rebuild the master data.
 
I just rebuilt the master data using /install and it still is the same. I can auto embed a YouTube video just fine. Here is my Twitter settings:

Screenshot 2024-11-09 at 10.21.54 AM.webp
 
What are the oEmbed options settings?
They should be:

1731173146592.webp

Try reaching out to the developer of the add-on - there may be a known issue when uninstalling it.
 
Ok now, this makes no sense to me. Take these two Twitter posts. The top link will not embed using the default oEmbed, but the second link uses the default oEmbed just fine and displays properly. But If I post here on the test forum, they both embed just fine. I can't see what would be the difference between one Twitter link from the other? How can oEmbed choose one Twitter post over another? Plus, why would it work here? I have no addons, and have even paused Cloudflare just to make sure it wasn't blocking anything. I am at a loss.

Code:
https://x.com/Rainmaker1973/status/1855264548753641933

https://x.com/Wario64/status/1853860565510496696
 
How can oEmbed choose one Twitter post over another?
It's probably random. I've tried a few times in a row with different URLs and I got completely inconsistent results.

Plus, why would it work here?
It's entirely possible that requests from this (xenforo.com) server are processed on a different cluster than requests from yours. In that case, they could have different error rates. It's also possible that Twitter's servers don't like your server's IP (identifies it as a bot/crawler or a bad actor) and discourages it by returning more errors. Occam's razor points towards simple failures though.
 
Come to think of it, if you've recently rebuilt your post embed metadata, your server may have largely exceeded Twitter's quota for oEmbed requests too as every new tweets caused 1 request to be made.
 
It's probably random. I've tried a few times in a row with different URLs and I got completely inconsistent results.


It's entirely possible that requests from this (xenforo.com) server are processed on a different cluster than requests from yours. In that case, they could have different error rates. It's also possible that Twitter's servers don't like your server's IP (identifies it as a bot/crawler or a bad actor) and discourages it by returning more errors. Occam's razor points towards simple failures though.
Ya I have tried everything and just went back to your addon. Maybe it will fix itself in the future. Thanks for checking!
 
Come to think of it, if you've recently rebuilt your post embed metadata, your server may have largely exceeded Twitter's quota for oEmbed requests too as every new tweets caused 1 request to be made.
Here is what I found online. How does your addon bypass the rate limit then? Because everything loads perfectly with your addon.
 
Last edited:
There's certainly one, as even an "unlimited" service will typically have an arbitrarily-high-but-not-quite-infinite quota, but I don't think there's any public info about it. Twitter proxies alternative frontends such as Nitter have had similar issues in the past but I don't follow them close enough to know the details.
 
It's odd, if I open a console session and watch it fetch, some Twitter links fetch properly, others I get:

Code:
Unable to fetch twitter media id: 1855264548753641933
oembedFetchError    @    embed.min.js?_v=b6712093:3
handleResponse    @    embed.min.js?_v=b6712093:1
(anonymous)    @    embed.min.js?_v=b6712093:1
Promise.then      
init    @    embed.min.js?_v=b6712093:1
c    @    core-compiled.js?_v=b6712093:192
b    @    core-compiled.js?_v=b6712093:193
initialize    @    core-compiled.js?_v=b6712093:194
activate    @    core-compiled.js?_v=b6712093:44
(anonymous)    @    editor-compiled.js?_v=b6712093:1118
(anonymous)    @    core-compiled.js?_v=b6712093:49
(anonymous)    @    core-compiled.js?_v=b6712093:106
Promise.then      
b    @    core-compiled.js?_v=b6712093:105
setupHtmlInsert    @    core-compiled.js?_v=b6712093:47
(anonymous)    @    editor-compiled.js?_v=b6712093:1118
l    @    core-compiled.js?_v=b6712093:38
ajax    @    core-compiled.js?_v=b6712093:41
await in ajax      
f    @    editor-compiled.js?_v=b6712093:1117
n    @    editor-compiled.js?_v=b6712093:1119
callback    @    editor-compiled.js?_v=b6712093:1094
l    @    editor-compiled.js?_v=b6712093:86
n    @    editor-compiled.js?_v=b6712093:425
p    @    editor-compiled.js?_v=b6712093:427
m    @    editor-compiled.js?_v=b6712093:427
p    @    editor-compiled.js?_v=b6712093:73
(anonymous)    @    editor-compiled.js?_v=b6712093:77
(anonymous)    @    editor-compiled.js?_v=b6712093:564

But it works properly here and I can manually visit it just fine. Other links fetch and render just fine.
 
Back
Top Bottom