Onebox default og:type

(Quenten) #1

Hi !
I started recently playing with the Onebox gem to see why it wouldn’t Onebox my site:
I am no ruby developer but I understood that based on the URI , Onebox chooses what engine to use.

I also believe that there is an engine called html which is the default one if the link doesn’t match any predefined engine.

The question I’m asking is : why doesn’t onebox choose the default engine HTML to my website? When I’m debugging the @engine_class I get nil in the preview class , initialize method.

All answers are much appreciated.
Thanks you

(Jeff Atwood) #2

Did you try checking your site in Iframely URL Debugger - Open Graph, Twitter Cards, oEmbed first?

(Quenten) #3

Of course ! and everything is set correctly
Please check it out yourself.

And this is the url I’m testing
As you see it’s not oneboxed here neither.

(Jeff Atwood) #4

Not sure, perhaps @zogstrip can advise.

(Régis Hanol) #5

Open Graph has 4 required fields (title, type, image and url). Your website only shows title and image. Without a type, the onebox doesn’t know what to do.

(Jeff Atwood) #6

Hmm it looks like only “type” is missing, can we infer that if we have everything else? Assume a very general type?

<meta name="og:description" content="Kia K2700 Modèle 2007 motor bone etae jami accidentie pnawat kamlin jdad zwa9a wahda jaj éLiqtrik + 2 port centralize + mp3 C D dariba 700dh libghh ...">
<meta name="og:title" content="Kia K2700 Diesel à   dans Camions |">
<meta name="og:image" content=""/>

ooh also @zogstrip it says in the spec:

No additional properties other than the basic ones. Any non-marked up webpage should be treated as og:type website.

So arguably we are wrong here.

(Rafael dos Santos Silva) #7

Yeah, I was chatting with @eviltrout about that the other day. With the new whitelist everything, we should use the same approach as Facebook, that tries to fill as many tags as possible (like using title tag instead of og:title if the last doest exist).

(Quenten) #8

Hi guys,
No rush, but when are you planning on having this fix ?
Thank you in advance.

(Jeff Atwood) #9

@zogstrip will reply here when og:type inference is in. I see very little risk if the other necessary fields are present.

I suppose we could also safely infer og:title as @falco says, using the HTML <title> tag, but I am not sure we ever want to infer description or image.

(Rafael dos Santos Silva) #10

Yeah, inferring can result into some strange results:

(Jeff Atwood) #11

All I see is “log into Facebook”…

(Gerhard Schlager) #12

(Jeff Atwood) #13

Aha yes for the root domain we should actually add those tags! Will do tonight.

(Régis Hanol) #14

It works fine now :wink:

(Jeff Atwood) #15