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

Offline Асен Баръмов

  • Posts: 31
  • Gender: Male
    • 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:
Only registered users can see contents. Please click here to Register or Login.
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

  • WebsiteBaker Org e.V.
  • **
  • Posts: 3568
  • Gender: Male
  • 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 Асен Баръмов

  • Posts: 31
  • Gender: Male
    • 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 Асен Баръмов

  • Posts: 31
  • Gender: Male
    • 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:
Only registered users can see contents. Please click here to Register or Login.
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:
Only registered users can see contents. Please click here to Register or Login.
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

  • WebsiteBaker Org e.V.
  • **
  • Posts: 3568
  • Gender: Male
  • 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

  • Global Moderator
  • *****
  • Posts: 4671
  • Gender: Male
    • 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
Es bist immer nur Du, auch wenn du mich vergisst, es gibt niemanden, der mir näher ist
Immer nur du, die mich wach hält
(*miss you*)