简体   繁体   English

更改页面标题不适用于 facebook 元标记

[英]changing title of page doesn't work with facebook meta tags

I'm trying to set my meta tags for facebook like, but I have like button on changing page which means that title will be always different.我正在尝试为 facebook 设置我的元标记,但我在更改页面上有喜欢按钮,这意味着标题将始终不同。 My meta tag look like:我的元标记看起来像:

<meta property="og:title" content="<?php echo $listing['Listing']['title']?>" />

or whatever code I put there.或者我放在那里的任何代码。 It shows my title at debuger like:它在调试器中显示我的标题,例如:

<?php echo $listing['Listing']['title']?>

Simply sad, what's in inverted comas, that's title.简直令人难过,倒置的昏迷是什么,这就是标题。 Why?为什么? why it doesn't accpet that php code?为什么它不接受 php 代码?

What file did you post the code into?您将代码发布到哪个文件? It looks like it's not where it's supposed to be... I'd advise putting the tag into your template (/templates/yourtemplate/index.php)它看起来不像它应该在的地方......我建议将标签放入你的模板中(/templates/yourtemplate/index.php)

Alternatively there's alot of extensions that can handle this for you: http://extensions.joomla.org/search?q=facebook+open+graph或者,有很多扩展程序可以为您处理此问题: http://extensions.joomla.org/search?q=facebook+open+graph

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用PHP从Facebook页面获取标题和元标记 - Get title and meta tags from Facebook page with PHP PHP获取元标记功能不适用于非HTTP - PHP get meta tags function doesn't work with non http 为什么有诸如Facebook / Digg / Reddit之类的网站无法解析页面上用于标题/描述的适当元标记的原因? - Is there a reason why sites like Facebook/Digg/Reddit would not parse the proper meta tags on a page for title/description? 适用于特定Facebook元标记的PHP方法可以正常工作,但不能在Facebook平台上使用 - PHP method for specific Facebook meta-tags works itself but doesn't on Facebook platform prestashop更改页面图标不起作用 - prestashop changing page icon doesn't work 更改语言环境在索引页面上不起作用 - Changing locale doesn't work on the index page 在Dreamweaver中设置另一个页面的页面标题和元标记 - set page title and meta tags from another page in dreamweaver 用PHP获取元标记不起作用 - get meta tags with php don't work “自定义存档”页面不适用于日期或标签,但适用于类别 - Custom Archive page doesn't work with dates or tags but works with categories 如何在搜索结果页面中添加元标记,以便通过addthis与Facebook分享 - How to add meta tags in search result page, for sharing to facebook with addthis
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM