kakadais
kakadais

Reputation: 491

In Meteor : How to apply OpenGraph Dynamically for search engines (google+ or Facebook)

Actually what I want to do is make my pages link to be shown on the google+ or Facebook post with the OpenGraph tags.

I made my post page changes the

I tried these way,

  1. first of all, I declared the meta tag inside first.

  2. then tried to change the tags in the template helpers dynamically like this.

    title: -> $("meta[property='og:title']").attr "content", @title @title

  3. used manuelschoebel:ms-seo package from atmosphere

    onAfterAction: -> unless Meteor.isClient then return data = @data() SEO.set title: data.title meta: description: 'changedBySEO' og: title: data.title description: 'changedBySEO'

But the result alway shows go title in head. I think google+ or Facebook just grab the meta tags only so the page rendering is not actually working.

Did I miss something or I should apply spiderable packages or something to do this functionality?

Thanks all-

Upvotes: 0

Views: 128

Answers (1)

ChenR
ChenR

Reputation: 161

you need the spiderable package, otherwise facebook can't see the tags created by the ms-seo package (remember they're dynamically created in js)

Upvotes: 0

Related Questions