Onebox challenges

Guys,

I’ve noticed that one boxing doesn’t always work.

I’m aware of how it works with Open Graph (no tags, fair enough)

I’m also aware it does more than just rely on OG in many cases. However there’s a lot of scope that falls outside of this?

I was curious how Facebook appears to reliably provide a preview when you post a URL that does not have Open Graph support.

It looks as though, according to Facebooks developer “preview debugger” they create a lot of the previews using the available raw tags.

Has anyone thought about implementing such a solution for Discourse? Has someone already had a go?

Forgive me for any unreasonable expectations or assumptions.

2 Likes

I’d also like to see this. Whilst it’s important to encourage OG adoption, we should have some kind of basic fallback (favicon, site title) so that Discourse users are not confused when they paste a URL into the title box and nothing happens.

1 Like

Yeah, I’m about to try and encourage a “quick-fire” sharing community off of Facebook and support for previews is imho a really important aspect that needs to be solid (and one of the reasons I got involved in contributing to the TLP plugin).

2 Likes

Most websites these days are OpenGraph and oEmbed compatible. Which URLs are you seeing that are not?

For my local community forum, we have trouble with links to our local council website. Example:

https://www.lewisham.gov.uk/myservices/counciltax/Pages/default.aspx

Local government websites in the UK are generally quite old fashioned.

1 Like

Oh … I think I’ve found part of the problem … on multiple sites (even on Meta) I can reproduce this:

When I paste a link into Title it doesn’t always convert into a Title … sometimes you are left with a URL. This is an intermittent issue … is this rate limited locally or remotely, somehow? Interestingly, once it works, you can delete it and it will work again instantly … as if being cached?

Rebuilding the HTML of the first post does not fix the Title even if it’s still a URL.

NB I don’t see any javascript errors on console when this fails.

That URL seems to be resolved by “iFramely” but that is not a free service.

1 Like

Is there a solution to this one box issue? I get about a 70% success rate on one box working.

Here’s a link to one of my pages where one box is not working:

Have you verified whether that page contains valid opengraph data to onebox?

3 Likes

Yes, check the target page source for those tags.

You could try curl https://private-island-tours.com | grep \"og: from your server as a quick check. If this comes back with no rows of source, you know you the page does not contain those tags or your server is being blocked from crawling.

In this case I cannot see the tags. You could reach out to the webmaster and encourage her to add them!

3 Likes

I have not, but I will ask, thank you.

1 Like

A post was split to a new topic: Displaying oneboxes in Hide Details