Open Graph (last version) not working ?

Phoca plugins - support for all Phoca plugins except Phoca Gallery plugins
johan27
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 10 Jun 2015, 12:27

Open Graph (last version) not working ?

Post by johan27 »

Hello all ^^

I'm using the "plg_content_phocaopengraph_v3.0.2", within Joomla 3.4.1
The website is all about real estate.

I'm using the component JEA for Joomle Estate Agency.
Into Facebook, I can't share any product's link, such grandpalais-immo.fr/vente/10-menton-garavan-villa-jumelee-vue-mer-piscine.html .

So I installed this phoca plugin, with the default options.
But then, it seems not working.
I can't display, within Facebook, any pictures of the link.

Can you help me out ?
Maybe I forgot something ?

Greeting !!
:)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph (last version) not working ?

Post by Jan »

Hi, is the code included in html source code?

Jan
If you find Phoca extensions useful, please support the project
johan27
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 10 Jun 2015, 12:27

Re: Open Graph (last version) not working ?

Post by johan27 »

hu ?
Hello Jan :)
Sorry, but which code in which html file ?

:( sorry for my reply
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph (last version) not working ?

Post by Jan »

Hi, if you can see the opengraph code in your html source code.

Try to update to version 3.0.3 and in parameters try to change the render type: from Name to Property, test if the og meta tags are included in source of your html site and recheck it again on FB :idea:

Jan
If you find Phoca extensions useful, please support the project
johan27
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 10 Jun 2015, 12:27

Re: Open Graph (last version) not working ?

Post by johan27 »

Thanks Jan,
But what do you mean by this line :
Jan wrote:Hi, if you can see the opengraph code in your html source code.
Have a great day :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph (last version) not working ?

Post by Jan »

It means that the plugin renders meta tags for your site:

<meta name="..." ...
etc.

These are html tags and you need to be sure they were rendered - to see them you need to see html source of your site - e.g. in Firefox you click on the site with right mouse button and will see the source code of your site and there you can check the tags were rendered (to be sure the plugin works Ok)

Jan
If you find Phoca extensions useful, please support the project
johan27
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 10 Jun 2015, 12:27

Re: Open Graph (last version) not working ?

Post by johan27 »

Hello Jan,

here the link of the url which has problem :
grandpalais-immo.fr/vente/14-propriete-d-exception-menton-garavan.html

I'm sorry but I don't get it :(
Can you help please ?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph (last version) not working ?

Post by Jan »

Hi, I see only description tag there.

Please update to latest version and let me know. Anyway is this link a link to article (can you paste the link without SEF enabled) or do you use any other method to display content?

Jan
If you find Phoca extensions useful, please support the project
planetcrypton
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 03 Jul 2015, 11:47

Re: Open Graph (last version) not working ?

Post by planetcrypton »

Hi Jan, I'm experiencing something simular on my production site (my as good as identical development site had the plugin working straight away).
The production site didn't produce the meta tags with og: properties in the markup.
After having followed your advice "change the render type: from Name to Property" it showed up (now at the bottom of <head> in stead og top, but nvm).

The difference to my development site is that og:type doesn't come up at the production site, and therefor FB comes with an error.
Check for yourself: https://www.sparthy.dk/ungdom/muhny-0-1 ... il-bornene

Another bug that I experience on both sites, is that og:description always is the same as og:title - even though I set the parameter Introtext As Description to Yes.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Open Graph (last version) not working ?

Post by Jan »

Hi, the standard way to render the tags is per Joomla! methods - they order it at the top of the code but with "name" attribute. Non standard method uses "property" but it is done non standard way so it is not ordered like by first method - but this has no influence on the function - it works still the same way (it does not matter which way it is ordered)

See the code for description:

Code: Select all

// Description
        if ($this->params->get('description'.$suffix, '') != '') {
            plgContentPhocaOpenGraphHelper::renderTag('og:description', $this->params->get('description'.$suffix, ''), $type);
        } else if (isset($thisDesc) && $thisDesc != '') {
            plgContentPhocaOpenGraphHelper::renderTag('og:description', $thisDesc, $type);
        } else if ($config->get('MetaDesc') != '') {
            plgContentPhocaOpenGraphHelper::renderTag('og:description', $config->get('MetaDesc'), $type);
        } else if (isset($row->introtext) && $row->introtext != '' && $desc_intro == 1) {
            $iTD = str_replace("\r\n", ' ', strip_tags($row->introtext));
            $iTD = str_replace("\n", ' ', $iTD);
            $iTD = str_replace("\n", ' ', $iTD);
            plgContentPhocaOpenGraphHelper::renderTag('og:description', $iTD, $type);
        } 
1) description from plugin parameter is used
2) when there is no description then from meta description of article
3) when thre is no description then from meta description of site
4) when there is no description and it is allowed to use introtext ( can be set in plugin parameters) then the introtext is used.

Jan
If you find Phoca extensions useful, please support the project
Post Reply