Reputation: 761
I use the smarty template engine and I have placed some Facebook meta tags on my site. It appears that Facebook's scraper is faster than the rendering smarty rendering engine.
Here is a link to the LINT tool's output: https://developers.facebook.com/tools/debug/og/echo?q=http%3A%2F%2Fslipdragon.com%2Fvideo%2F6XA881OYRRHB%2FBmx-Street-Video--Vasya-L--Carhartt-Team
In my template I drawing the meta tags from variables assigned by the template engine:
<meta property="og:title" content="{$vdo.title|strip_tags|strip}" />
<meta property="og:description" content="{$vdo.description|strip_tags|strip}" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://slipdragon.com{$smarty.server.REQUEST_URI}" />
Any ideas how to set this up? It appears that smarty rendering of the template is too slow for Facebook's scraper . According to the LINT tool Facebook isn't evening seeing a og:title or any other meta tag properly populated.
Upvotes: 0
Views: 541
Reputation: 11213
I checked your url.
The values are blank, its got nothing to do with speed, Smarty tags are blank when they dont exist.
Somehow
{$vdo.title|strip_tags|strip}
{$vdo.description|strip_tags|strip}
dont exist, please try locally and get the values in before involving facebook.
Upvotes: 0
Reputation: 761
The problem was authentication. Facebook's LINT tool is not able to correctly parse the page because it is behind login credentials. Thanks!
Upvotes: 0
Reputation: 13557
activate debugging and see how long the actual rendering of the template took. Unless you're doing some really funky things or screwed up badly - Smarty is not causing the delay. It's much more likely that some of your database queries, external resource lookups, etc. are the cause.
Upvotes: 1