sfaxa.org/blog/108-drone-wars-q-a
If you view page source you'll see the Phoca og tags generated correctly (except the image tag at the time of posting), however...
When you run this address through Facebook's Debugger and select "See exactly what our scraper sees for your URL " at the very bottom, there are NO Phoca og tags at all.
Any ideas???
Facebook Debugger Does Not See Phoca Open Graph Tags At All
-
- Phoca Member
- Posts: 16
- Joined: 07 May 2012, 05:16
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi, hmm, really no idea what FB does not display the tags when they are here? Did you ask Facebook developers
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 16
- Joined: 07 May 2012, 05:16
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi Jan,
No, I have not contacted FB as the issue seems to be with either Joomla or Phoca. The meta tags being generated read "meta name=" when they should read "meta property=" for fb to recognize them.
I was able to solve that problem by changing a core Joomla file. :/
To get FB to recognize the meta tags at all, though, I had to remove all settings from Phoca OG plugin and upload an image named after the article to images/phocaopengraph DESPITE their being both intro and fulltext images assigned in the article settings. :/
Now FB actually recognizes the meta tags but I'm getting a new error...
Scrape Information
Response Code 200
Fetched URL sfaxa.org/blog/131-rooms-for-rent
Canonical URL sfaxa.org/blog/131-rooms-for-rent
Errors That Must Be Fixed
Object at URL 'sfaxa.org/blog/131-rooms-for-rent' of type 'article' is invalid because it specifies multiple 'og:url' values: sfaxa.org/blog/131-rooms-for-rent, sfaxa.org.
I have double checked in my plugins for Joomla and Phoca is the only result when searching for "open" and "meta" - I DO have site metadata assigned within Joomla global config but there is no site url assigned there.
I have no idea what where FB is getting the site url as a meta tag... it doesn't even display in my page's source code! Gah - I'm getting ready to give up
Please help if you can!
No, I have not contacted FB as the issue seems to be with either Joomla or Phoca. The meta tags being generated read "meta name=" when they should read "meta property=" for fb to recognize them.
I was able to solve that problem by changing a core Joomla file. :/
To get FB to recognize the meta tags at all, though, I had to remove all settings from Phoca OG plugin and upload an image named after the article to images/phocaopengraph DESPITE their being both intro and fulltext images assigned in the article settings. :/
Now FB actually recognizes the meta tags but I'm getting a new error...
Scrape Information
Response Code 200
Fetched URL sfaxa.org/blog/131-rooms-for-rent
Canonical URL sfaxa.org/blog/131-rooms-for-rent
Errors That Must Be Fixed
Object at URL 'sfaxa.org/blog/131-rooms-for-rent' of type 'article' is invalid because it specifies multiple 'og:url' values: sfaxa.org/blog/131-rooms-for-rent, sfaxa.org.
I have double checked in my plugins for Joomla and Phoca is the only result when searching for "open" and "meta" - I DO have site metadata assigned within Joomla global config but there is no site url assigned there.
I have no idea what where FB is getting the site url as a meta tag... it doesn't even display in my page's source code! Gah - I'm getting ready to give up
Please help if you can!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi, which version of Phoca Open Graph plugin you are running?
Unfortunately it is hard to help there as FB changes the rules regularly and the plugin just renders the code which are demanded by FB - but then everything - all the framework is driven by FB - so if something will work or not depends on the FB framework
The next problem is, Phoca Open Graph plugin does not render the meta tags, they are rendered by Joomla!:
method setMetadata is Joomla! method, so if there should be some customization, it should be done in Joomla! directly, but really no idea if this is the problem
Jan
Unfortunately it is hard to help there as FB changes the rules regularly and the plugin just renders the code which are demanded by FB - but then everything - all the framework is driven by FB - so if something will work or not depends on the FB framework
The next problem is, Phoca Open Graph plugin does not render the meta tags, they are rendered by Joomla!:
Code: Select all
// Title
if ($this->params->get('title'.$suffix, '') != '') {
$document->setMetadata('og:title', htmlspecialchars($this->params->get('title'.$suffix, '')));
} else if ($row->title != '') {
$document->setMetadata('og:title', htmlspecialchars($thisTitle));
}
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 16
- Joined: 07 May 2012, 05:16
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi Jan,
Let me explain again because your last message really just states the same things I said in my pp. Here are the issues I'm experiencing:
1. Joomla writes meta tags with the name attribute instead of property. I have currently fixed that with a hack to the core Joomla files.
2. Phoca OG will ONLY generate image meta tag if I manually add a copy of the article image to images/phocaopengraph. This is in spite of assigning intro and fulltext images to the article via Joomla's options.
3. Facebook is still not scraping Phoca OG's meta tags correctly. While it does recognize them, I'm getting an error saying I've specificed multiple og:url values, which I cannot locate.
I'm using Phoca OG 3.0.0 on a Joomla 3.2.3 site with a rockettheme template.
Hope that info clears up my questions - Thanks for the help!
Let me explain again because your last message really just states the same things I said in my pp. Here are the issues I'm experiencing:
1. Joomla writes meta tags with the name attribute instead of property. I have currently fixed that with a hack to the core Joomla files.
2. Phoca OG will ONLY generate image meta tag if I manually add a copy of the article image to images/phocaopengraph. This is in spite of assigning intro and fulltext images to the article via Joomla's options.
3. Facebook is still not scraping Phoca OG's meta tags correctly. While it does recognize them, I'm getting an error saying I've specificed multiple og:url values, which I cannot locate.
I'm using Phoca OG 3.0.0 on a Joomla 3.2.3 site with a rockettheme template.
Hope that info clears up my questions - Thanks for the help!
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi, I understand the questions, but e.g. by 3) I really don't know the answer - the required fb code is sent by the plugin to Joomla! which renders it (with your modifications, it renders it by the FB guide) but why then FB does not accept, I really cannot say
So if I understand the 3) correctly - with all your modifications, you have made the right output code ... this means, when it is rendered, no Phoca plugin, no Joomla! or not rockettheme template is somehow assigned to the problem as they did their work - they just rendered (with your help the right code) to your html - but why it is not accepted by FB or why it says there is an error - I really cannot say
Jan
So if I understand the 3) correctly - with all your modifications, you have made the right output code ... this means, when it is rendered, no Phoca plugin, no Joomla! or not rockettheme template is somehow assigned to the problem as they did their work - they just rendered (with your help the right code) to your html - but why it is not accepted by FB or why it says there is an error - I really cannot say
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 27 Apr 2014, 11:49
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi, I have similar problem and I think the reason is in metatag attribute "name". Phoca Open Graph plugin generates metatags as follows:
<meta name="og:image" content="..." />
But it seems that FB doesnt accept such tags, it should be
<meta property="og:image" content="..." />
I found similar discussion here: viewtopic.php?f=29&t=24697
Do you have any idea how to rewrite the code using Joomla native methods (similar to setMetadata)? Thank you
<meta name="og:image" content="..." />
But it seems that FB doesnt accept such tags, it should be
<meta property="og:image" content="..." />
I found similar discussion here: viewtopic.php?f=29&t=24697
Do you have any idea how to rewrite the code using Joomla native methods (similar to setMetadata)? Thank you
-
- Phoca Newbie
- Posts: 2
- Joined: 27 Apr 2014, 11:49
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
It seems that addCustomTag method works. I've tried to add my own method to plgContentPhocaOpenGraph class
public function setMetadata($attrName, $attrValue, $content){
$document = JFactory::getDocument();
$metatag = "<meta $attrName='$attrValue' content='$content' />";
$document->addCustomTag($metatag);
}
and replace all occurencies of "$document->setMetadata(" with "$this->setMetadata('property'," and now it is ok.
And one more suggest - it would be perfect to take og:description from articles, not from site main description.
Thank you for your work
public function setMetadata($attrName, $attrValue, $content){
$document = JFactory::getDocument();
$metatag = "<meta $attrName='$attrValue' content='$content' />";
$document->addCustomTag($metatag);
}
and replace all occurencies of "$document->setMetadata(" with "$this->setMetadata('property'," and now it is ok.
And one more suggest - it would be perfect to take og:description from articles, not from site main description.
Thank you for your work
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
Hi, thank you for the info, I will take a look at it for the next version.
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 08 May 2014, 02:57
Re: Facebook Debugger Does Not See Phoca Open Graph Tags At
I do know why you have a duplicate on Rockettheme... check your index.php file in your template folder. They are attempting to put OG in the header but they're pulling from the root of the site and not the actual article.xaashley wrote:Hi Jan,
3. Facebook is still not scraping Phoca OG's meta tags correctly. While it does recognize them, I'm getting an error saying I've specificed multiple og:url values, which I cannot locate.
I'm using Phoca OG 3.0.0 on a Joomla 3.2.3 site with a rockettheme template.