XF 2.2 Twitter (now X) no longer auto embedding

nodle

Well-known member
It looks like Twitter (now X), is having new post come from X.com instead of Twitter.com, this is now breaking auto embeds. Anyone have a fix, or so we have to wait for an Xenforo update?
 
Hmm it's not that. There's something else going on.

If I make an exact copy of the twitter media site, name it twitter 2 and disable the original, the new one doesn't work (ignoring the whole x.com thing temporarily).

Does something get cached somewhere that could be causing an issue?
 
Is it so hard to set up a demo and get the code for yourself?
Question... did you use the exact Twitter template?
Reason I ask is I have an XF 2.2.13 instance site (and took the time to create a post using that) and then posted it here.. but when I went to try it on the site, it did show the embedded custom media I set up... but never showed the twitter post that I shared.
 
Yes, the default template embed code.
Hmmm... if I was really interested in figuring this out it would be time top do some deep diving... because I emulated what your image gave, then also checked the only other "change" from a newly created BB media code and used twitter in the cookie area.... and the posts showed the [MEDIA]set of numbers[/media] embed when editing the post, but no post shared post showed up.
Of course, I don't mess with Twitter at all ... and all the shares I am seeing still use twitter.com in the desktop share link they give.
Even the stylized X icon points me to twitter.com. Since I have Twitter-pater disabled on all my sites, I'm not going to take the time to chase this down.... those that it concerns can feel free to do so, or simply install the S9e media add-on and have the resolution in hand now.

Using a shared link from Smoking Pipes on Twitter desktop website (which going to X.com redirected me to) and posting it in my site using bone stock BB media code, I got this.

Screen Shot 2023-08-20 at 4.04.50 PM.png

I also found this rather amusing. Tells me to read more on Twitter... not X.

Screen Shot 2023-08-20 at 4.06.05 PM.png

Until Elon & and his merry band of misfits can come to a decision on what they want their "stuff" to link to/show as across all their interface offerings... I'll continue to ignore that platform.
 
Last edited:
@Brogan is there any plan to gave this fixed in a release? If so what is the timeline?
Not Brogan, but I can pretty much give you an answer. I'm sure it is... and the timeline is most likely when 2.2.14 is released (and if TwitterPater Musk has quit having his clowns mess with it).... as to when 2.2.14 will be out... When It's Ready™.
If you just "have" to have it now... you can install the s9e media add-on and it will work fine. The side benefit is two-fold.. you get a LOT more media share options, plus it gets updated a LOT quicker than the XF script does for this type of stuff.
 
Not Brogan, but I can pretty much give you an answer. I'm sure it is... and the timeline is most likely when 2.2.14 is released (and if TwitterPater Musk has quit having his clowns mess with it).... as to when 2.2.14 will be out... When It's Ready™.
If you just "have" to have it now... you can install the s9e media add-on and it will work fine. The side benefit is two-fold.. you get a LOT more media share options, plus it gets updated a LOT quicker than the XF script does for this type of stuff.
but I don't want to install a plugin for this fix
 
but I don't want to install a plugin for this fix
Then you can either try the fix that was detailed by Brogan, or you can simply wait. Odds are in a week or two they will make more changes to it (and maybe even start requiring you to be a paid participant to have their "data" shared on your site). Musk is doing everything he can to kill Twitter and scrape back as much money as he blew.
 
I would like to get what you posted for the subsequent boxes

Match URLs:

Code:
x.com/*/status/{$id}
x.com/statuses/{$id}
twitter.com/*/status/{$id}
twitter.com/statuses/{$id}

Embed template:

Code:
<xf:page option="jsState.twitter" value="{{ true }}" />
<xf:js src="xf/embed.js" min="1" />

<div class="bbMediaJustifier bbCode-tweet"
      data-media-site-id="{$siteId}"
      data-media-key="{$id}"
      data-xf-init="tweet"
      data-tweet-id="{$id}"
      data-lang="{$xf.language.language_code}"
      data-theme="{{ property('styleType') }}"
      ><a href="https://twitter.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://twitter.com/i/web/status/{$id}</a></div>
 
Match URLs:

Code:
x.com/*/status/{$id}
x.com/statuses/{$id}
twitter.com/*/status/{$id}
twitter.com/statuses/{$id}

Embed template:

Code:
<xf:page option="jsState.twitter" value="{{ true }}" />
<xf:js src="xf/embed.js" min="1" />

<div class="bbMediaJustifier bbCode-tweet"
      data-media-site-id="{$siteId}"
      data-media-key="{$id}"
      data-xf-init="tweet"
      data-tweet-id="{$id}"
      data-lang="{$xf.language.language_code}"
      data-theme="{{ property('styleType') }}"
      ><a href="https://twitter.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://twitter.com/i/web/status/{$id}</a></div>

Thank you, that worked great (y)
 
Back
Top Bottom