tomwasd / flow-router-seo

34 stars 8 forks source link

Facebook and SEO #10

Open ivanthemeh opened 8 years ago

ivanthemeh commented 8 years ago

I am trying to use this package to set up metas for facebook sharing and I have set some static routes in the database. When I load my app I am getting this error: Exception from sub flowRouterSEO id XP3Pkq2utPRDWyDtF ReferenceError: check is not defined I20151125-13:27:40.219(-5)? at [object Object]._handler (packages/tomwasd_flow-router-seo/packages/tomwasd_flow-router-seo.js:155:1)

This is how Im using the code: in a meteor startup function on server: SEO.routes.upsert({routeName: 'home'}, {$set: { title: 'pHusion Beauty', description: 'Beauty - Sleep - Relaxation', meta: { 'property="og:image"': 'http://hair.com/upload/models.png' } }}); SEO.routes.upsert({routeName: 'product'}, {$set: { title: 'pHusion Beauty', description: 'Beauty - Sleep - Relaxation', meta: { 'property="og:image"': 'http://hair.com/upload/models.png' } }}); SEO.routes.upsert({routeName: 'checkout'}, {$set: { title: 'pHusion Beauty - Checkout', description: 'I just made a purchase at pHusionforhair.com', meta: { 'property="og:image"': 'http://hair.com/upload/logo.png' } }});

and to initialize the package in root of app (both): SEO = new FlowRouterSEO({database: true});

I have been working on this facebook and dynamic sharing in my app for several days and was hoping this package would do it for me..any help would be appreciated.

tomwasd commented 8 years ago

Hi @ivanthemeh,

It's because the check package isn't listed as a dependency in the package.js file. I'll see if I can get around to adding it in but feel free to fork and make the change yourself in the meanwhile :)

ivanthemeh commented 8 years ago

How would I go about doing that and would this prevent the crawler for facebook from seeing the data?

ivanthemeh commented 8 years ago

I would almost pay someone at this point to help me set up dynamic sharing in my website...