XF 2.2 Bluesky and Oembed?

kirsty

Member
I'm trying to add oembed for Bluesky to my BB code media sites in XenForo using the info from https://docs.bsky.app/docs/advanced-guides/oembed

Bluesky wants the whole url passing through to it's oembed endpoint.

Is there a way to do this with the XF setup for oembed? I can't figure out how to tell it to apply this to urls like https://bsky.app/profile/*/post/* but then have {$id} set to that whole url?
 
So in the process of looking into this, I accidentally added it to the next XF release :)

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

It's slightly more involved than is typical as we have to do a bunch of stuff to manage the Bluesky embed script and ensure content added in after the page is loaded is still embedded correctly.

You might be able to get some of the way with the following:

Match URLs:

Code:
#^https://bsky\.app/profile/(?P<id>.*/post/.*)$#siU

Embed HTML:

Code:
<!-- oEmbed - template unused -->

Oembed URL scheme:

Code:
https://bsky.app/profile/{$id}

Ensure "Use 'Match URLs' as PCRE regular expressions" is checked.
 
It still seems to be working here.

The example post that was embedded in the previous post is no longer available hence why it no longer displays.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
It still seems to be working here.
I can only get the oembed to return the <blockquote> and text, it won't "style" into the Bluesky badge.

I have "Retain javascript in returned oEmbed HTML" checked. Is there something more to do to initialise the JS?
 
We have the same problem as @TimT.
Bluesky embeds look like this:

1739137577578.webp

This is on our forum running XF v2.3.4.
However, on an old forum running XF v2.2.13, the posts are embedded perfectly, even though the media site embed configurations are identical on both forums.

I believe we had Bluesky embeds working fine on v2.3.4 a couple of weeks ago.
What happened, and how can we make it work properly again?
Thanks!
 
Hey @diskutopia I got the embeds working after updating to 2.3.5.

But I had to set Retain javascript in returned oEmbed HTML to OFF / unchecked.

Which doesn't quite make sense to me, but maybe 2.3.5 has the Javascript built in now?

I also updated Cookie third parties to "bsky" although not sure if that has any impact.
 
Hey @diskutopia I got the embeds working after updating to 2.3.5.

But I had to set Retain javascript in returned oEmbed HTML to OFF / unchecked.

Which doesn't quite make sense to me, but maybe 2.3.5 has the Javascript built in now?

I also updated Cookie third parties to "bsky" although not sure if that has any impact.
Thanks for replying!
We've tried both of your tips ("Retain JS" and "bsky cookie"), unfortunately with no luck.
Upgrading to 2.3.5 is not an option for us at this time, I think.
Glad you got it sorted out.
 
Back
Top Bottom