The <meta property="og:image" content=" " /> is extremely important as it gives a thumbnail when the page gets shared. However now it's just a white thumbnail as no photo is specified. I want each page to have their own photo which means in each template I need to put the meta tag.
It only works when they're in my master page, any ideas?
If I debug with the facebook debugger it doesn't even show up, it only shows the code in my master page, it's like it doesn't exist on other templates.
I checked again this morning. Turns out the meta tags are being rendered in the body instead of the <head> like it's in the code. I think it's because the template is being loaded into the master's page it's body.
Meta tags
Hello,
I'm trying to place some meta tags inside my templates but they don't seem to work. The tags only work then they are placed inside my master page.
I'm trying to use these tags:
The
<meta property="og:image" content=" " />
is extremely important as it gives a thumbnail when the page gets shared. However now it's just a white thumbnail as no photo is specified. I want each page to have their own photo which means in each template I need to put the meta tag.It only works when they're in my master page, any ideas?
Hi Mike
Can you show Razor code that renders these tags? These metatags should be in the head tag of the page?
Thanks,
Alex
If I debug with the facebook debugger it doesn't even show up, it only shows the code in my master page, it's like it doesn't exist on other templates.
facebook debugger I use
Did you inherit your templates from the master?
Yeah.
what if you look at source code of the page?
do you see tags?
Yeah I can see them, they are also filled out.
I checked again this morning. Turns out the meta tags are being rendered in the body instead of the
<head>
like it's in the code. I think it's because the template is being loaded into the master's page it's body.Any solution to this?
I managed to get it fixed with a solution on stackoverflow.
is working on a reply...