How to do Facebook Open Graph friendly meta tags with client-side template engines like AngularJS, Mustache, Handlebars -


according testing, facebook's crawlers not render client-side templates browser.

i want avoid webserver , building html files open graph objects @ costs. want generate meta tags on fly via url, seems facebook cannot this.

can facebook please confirm? asked head of open graph @ #mobiledevcon , said facebook can render stuff {{value}}

my meta tags follows, , render fine in every browser. facebook open graph debugger sees raw text, not interpolated content.

<meta property="{{meta.property}}" content="{{meta.content}}"> 

when think it should clear, why not work.

the facebook crawler downloads html served server. facebook crawler will not execute javascript, crawler not execute javascript. due security restrictions , speed reason (they not have time execute javascript on servers.)

there no way around this. if want crawler index page, need give them directly want them read.

tip: use phantom.js render pages on server side , serve crawlers.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -