Onebox default og:type

Hi !
I started recently playing with the Onebox gem to see why it wouldn’t Onebox my site: https://www.avito.ma.
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

1 Like

Did you try checking your site in http://iframely.com/debug first?

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

And this is the url I’m testing
https://www.avito.ma/fr/casablanca/camions/Kia_K2700_Diesel_15673276.htm
As you see it’s not oneboxed here neither.

Not sure, perhaps @zogstrip can advise.

1 Like

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.

1 Like

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 | Avito.ma">
<meta name="og:image" content="http://www.avito.ma/images/07/0791523985.jpg"/>

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.

7 Likes

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).

6 Likes

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

1 Like

@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.

2 Likes

Yeah, inferring can result into some strange results:

https://developers.facebook.com/tools/debug/sharing/?q=www.discourse.org

All I see is “log into Facebook”…

2 Likes

5 Likes

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

5 Likes

It works fine now :wink:

https://www.avito.ma/fr/khemisset/voitures/Fiat_Uno_18206489.htm

5 Likes