Author Topic: SocialBaker & News (with openGraph)  (Read 137 times)

Offline thefly

  • Posts: 24
    • graphic & web design
SocialBaker & News (with openGraph)
« on: May 10, 2017, 04:33:11 PM »
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: [Select]
<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" />

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?
smile!

Offline Ruud

  • Posts: 3482
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: SocialBaker & News (with openGraph)
« Reply #1 on: May 10, 2017, 04:50:16 PM »
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.


Offline thefly

  • Posts: 24
    • graphic & web design
Re: SocialBaker & News (with openGraph)
« Reply #2 on: May 10, 2017, 05:38:07 PM »
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!
smile!

Offline thefly

  • Posts: 24
    • graphic & web design
Re: SocialBaker & News (with openGraph)
« Reply #3 on: May 22, 2017, 03:45:27 PM »
Hi again, Ruud!

There is a problem :)

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

OpenGraph returns:
Code: [Select]
<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" />

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: [Select]
<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" />

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 :))
smile!

Offline Ruud

  • Posts: 3482
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: SocialBaker & News (with openGraph)
« Reply #4 on: May 22, 2017, 04:11:29 PM »
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.

Offline jacobi22

  • Posts: 4206
    • Jacobi22
Re: SocialBaker & News (with openGraph)
« Reply #5 on: May 23, 2017, 12:03:12 PM »
pls check all your page settings from every single page, you have a language mix there (inside of a tree), some pages has language=BG, some language=EN

example:
http://asen.baramov.org/pages/segashno-prodlzhitelno.php has language BG and is parent of the next page with language = EN (http://asen.baramov.org/pages/segashno-prodlzhitelno/vidimoto.php) . Next child in this tree is http://asen.baramov.org/pages/segashno-prodlzhitelno/bibliotechka.php and language = BG

everytime, when you have a language mix inside of a tree-element, WB add this language info to the link, because, its different to the parent page and not possible, to inherit the language to the child page.
solution: build a separat page tree's for every language and this problem is gone
Du warst hier in meiner Seele und bist jetzt meilenweit entfernt
Wenn ich in Liedern von dir erzähle, war das jede Träne wert!
Alex Diehl- In meiner Seele

 

postern-length