Hello Everyone
I'm trying to implement the Open Graph Protocol (http://ogp.me/) in my current solution, so users can get a nice preview of the content when referring to the site on different social media.
As of right now i have a somewhat working solution. I use a NotificationSubscriber that simply adds tags to the current PageView, and then renders them in head on my masterpage by using @GetValue("MetaTags"), which works nicely, as this appears in my <head>.
<meta name="og:title" content="Preview Test Title" />
<meta name="og:type" content="website" />
<meta name="generator" content="Dynamicweb 8" />
<meta name="og:url" content="http://www.mywebsite.com/Default.aspx?ID=1&Purge=True" />
<meta name="og:image:secure_url" content="/Files/Templates/Designs/{design}/img/logo.png" />
<meta name="og:image" content="/Files/Templates/Designs/{design}/img/logo.png" />
If i then open a url like this: "https://www.mywebsite.com/Default.aspx?ID=1&Purge=True" or "https://www.mywebsite.com/default.aspx?AreaID=1" in a Skype conversation, the preview is shown, title, image and all, just as it should.
The problem then occurs if i only use the first part of the url, "https://www.mywebsite.com". Then a odd preview with the title "Home" and no content is shown. There are no page anywhere in my solution that uses the title "Home", either in the admin panel or solution, which leads me to believe that it hits some default page that redirects(?).
If anyone could shed some light on the problem it would be much appreciated.
Bonus question: When i hit a NotificationSubscriber -> OnNotify, do i at this point in the lifecycle know if the page that is being rendered is a single product? If so, i would really like to change the preview image and title to corresponding the product.