Closed two9seven closed 7 years ago
code is not pasting right, sorry
Yeah, it's not going to work currently - the way to think of OpenGraph and how most consumers of it work is to think of the older Google Bot that didn't process any JavaScript. If you need any meta tags in the page they need to be added on the server because the only thing that's going to be looked at is the HTML file. So, if you're serving the same static index.html page and relying on client-side code to set them, it's not going to work.
The OG support was added for future use and / or if anyone creates any server-rendering system for web components.
In the meantime, it usually isn't difficult to do some server-rendering of the meta tags using whatever server platform / templating system you're familiar with. I use Go and have it use the index.html page that Polymer creates as the template so it's always in-sync with the client changes.
I'm using firebase to serve it. Not sure what to do about this. Thanks for the explanation though.
It depends what tech you know - a good / close alternative is AppEngine - it has several server-side languages (Go, Python, PHP, Java) each with their own templating system you can use and free hosting for low use.
I think I'll start learning about app engine then. I'm a novice and polymer and firebase was pretty easy to get going. Thanks again.
I am able to add meta tags to the head of the index. They end up at the end of the head section. I've set up OG tags for data derived from each page. I have a page of posters and then a details page which I want show different titles for. Why do you think the Facebook crawler is not seeing the OG tags. Heres my details page:
`