WebsiteBaker Support (2.8.x) > Droplets & Snippets

SocialBaker & News (with openGraph)

(1/2) > >>

thefly:
Hi, everyone! First, a million thanks to Ruud about his devoted work. And my question:

When I share thru SocialBaker a page on my site to FB, the FB doesn't show the image thats in the page. The page is in News section (WISIWYG pages are OK). I included the openGraph in <head> section and that is what I got:


--- Code: ---<link rel="canonical" href="http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php" />
<meta property="og:title" content="Македония, дизайн и дежа вю" />
<meta property="og:description" content="25 години Макпрогрес &ndash; Винаги заедно!" />
<meta property="og:site_name" content="бъдеще бешело" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="бъдеще бешело"/>
<meta name="twitter:title" content="Македония, дизайн и дежа вю"/>
<meta name="twitter:description" content="25 години Макпрогрес &ndash; Винаги заедно!"/>
<meta name="twitter:url" content="http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php" />
--- End code ---

I don't see here the og:image part. May be this is the problem (besides my DNA), but I cannot solve it. A little help?

Ruud:
openGraph() will only find (and add to the metadata) images in modules like Bakery and OneForAll where the images have fixed names and locations.
Images included in text (like in news or wysiwyg) are not detected and not added to the metadata. In that case it is up to Facebook if they find suitable images in the page.

If you want to keep using the "news" module you can manually upload images in /media/posts/{post_id}.jpg with the post_id of the news message.
In this case your article is named "makedonija-dizajn-i-dezha-vju223.php", telling us that it has post_id "223".
Upload the image you want facebook to use as "/media/posts/223.jpg" and that one will be included in the metadata.

Note that after changing this you will need to use this facebook developer page to tell facebook to get the new data and not use their cached version.

thefly:
Thanks for the prompt answer, Ruud!

Yes, I RFM on openGraph and manually uploaded the image with the proper name. The meta property "opï:image" is OK now, but obviously FB use some cashed information. Tomorrow I'll read some more on FB Debbuger, because he gave an error about "fb:app_id": Share App ID Missing.

And I'll try with some other posts and sites. FB reacts rather strange to me I should read more about this. Thank you again!

thefly:
Hi again, Ruud!

There is a problem :)

On:
http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php

OpenGraph returns:

--- Code: ---<link rel="canonical" href="http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php" />
<meta property="og:title" content="Македония, дизайн и дежа вю" />
<meta property="og:description" content="25 години Макпрогрес &ndash; Винаги заедно!" />
<meta property="og:site_name" content="бъдеще бешело" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="en_US" />
<meta property="og:url" content="http://asen.baramov.org/pages/posts/makedonija-dizajn-i-dezha-vju223.php" />
<meta property="og:image" content="http://asen.baramov.org/media/posts/223.jpg" />
<meta property="og:image:width" content="610" />
<meta property="og:image:height" content="290" />

--- End code ---

And image is OK, but the text is not from the post-page, but from the website description.

But on the:
http://ninavahab.com/pages/posts/100-nikuldena-49.php

OpenGraph returns:

--- Code: ---<link rel="canonical" href="http://ninavahab.com" />
<meta property="og:title" content="100 Никулдена" />
<meta property="og:description" content="Преди около година и половина Димитър Трайчев ми подари една банкнота от 100 никулдена." />
<meta property="og:site_name" content="Nina Vahab" />
<meta property="og:type" content="website" />
<meta property="og:locale" content="bg_BG" />
<meta property="og:url" content="http://ninavahab.com" />
<meta property="og:image" content="http://ninavahab.com/media/posts/49.jpg" />
<meta property="og:image:width" content="1000" />
<meta property="og:image:height" content="333" />

--- End code ---

Image is missing too, and the text is taken from the previous page – those with the titles of posts. I saw that canonical link and the URL after that are not the link that leads to the post page (http://ninavahab.com/pages/posts/100-nikuldena-49.php).

The PHP on both sites is version 5.4. WebsiteBaker version on the first site is 2.7, on the second site – 2.8.3.

I will be very grateful if you tell me where I missed something :))

Ruud:
Just guessing a bit....

On both sites the first time I clicked the link I was redirected to the overview page with the language selector. (&lang=EN and &lang=BG)
It actually opens: asen.baramov.org/pages/segashno-prodlzhitelno/vidimoto.php?lang=EN & ninavahab.com/pages/moite-istorii.php?lang=BG
This is probably done by WB because the websites default language is not the same as the language of that page.
The second time I click the same link it looks good (also the og: data as far as I can see).

I suppose your errors as when looking at what Facebook wants to use.
For the FB crawler, every hit is the first so I think it will always redirect and use a wrong page.

Nothing openGraph can do here, this is "standard" WB behavour.

Navigation

[0] Message Index

[#] Next page

Go to full version