XF 2.2 Twitter?

I am not on PHP 8 yet, so cannot use that plugin.

BBcode media site:

id = x

name = X

Site URL = https://twitter.com (they don't seem to have change that yet)



Match URLs

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

Embed URL

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://x.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://x.com/i/web/status/{$id}</a></div>

EDIT: I made a new BBcode media site named X and disable Twitter but you could probably just edit the Twitter one. EDIT: doing that will not survive upgrades see below...
 
Last edited:
BBcode media site:

id = x

name = X

Site URL = https://twitter.com (they don't seem to have change that yet)



Match URLs

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

Embed URL

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://x.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://x.com/i/web/status/{$id}</a></div>

EDIT: I made a new BBcode media site named X and disable Twitter but you could probably just eat the Twitter one.
Don't edit the default one it won't survive through upgrades.
 
BBcode media site:

id = x

name = X

Site URL = https://twitter.com (they don't seem to have change that yet)



Match URLs

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

Embed URL

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://x.com/i/web/status/{$id}" rel="external" target="_blank">
    <i class="fab fa-twitter" aria-hidden="true"></i> https://x.com/i/web/status/{$id}</a></div>

EDIT: I made a new BBcode media site named X and disable Twitter but you could probably just edit the Twitter one. EDIT: doing that will not survive upgrades see below...
This did not work for me, I created a new site called X and I tried with twitter enabled and disabled, nothing shows up.
 
Yes it should be fixed.

 
Yes it should be fixed.

fixed where?
 
fixed where?
 
Hello guys,

may I ask what is the best solution now?

Since a few days, twitter completely moved to x.com,
and twitter /x links won't show the tweet on my site, just the link.

Thanks for any suggestion.
 
Back
Top Bottom