Facebook Meta Tag og:image PHP condition -


i used php code og:image meta tag doesn't work, it's right doesn't call right source of image.

<?php jfactory::getdocument(); $document->addcustomtag('<meta property="og:image" content="http://www.sell4masari.com/images/com_adsmanager/ads/<?php.$img->image?>" />');?> 

so appreciate anyone.

you're putting <?php tags inside quotes, not being processed:

content="[...]/ads/<?php.$img->image?>" />'); 

you need build string through concatenation, so:

<?php jfactory::getdocument(); $document->addcustomtag('<meta property="og:image" content="http://www.sell4masari.com/images/com_adsmanager/ads/' . $img->image . '" />');?> 

Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -