Let's suppose I have a page with 10 products, when I click a button on one of the products it opens a pop-up (partial view) which has some share buttons. When I click 'Share on Facebook' it needs to have the correct meta-tags (title of the product, description of the product and image of the product). Is this possible? If so, how?
Thanks for your help I made a 2 new views(one from controller one w/o, with umbraco template and document type) on share click I send to facebook the url for the new view which has head and tags.
With JS/Ajax and the like it will never ever work, I have tried.
As i understand the facebook sharing mechanism, it page based, so you cant "send" info to it. It loads info from the metadata on the page.
But if you have 10 products on the page, dont you have 10 detail pages about the individual products? Couldn't you share the url of the detail page? and then have the correct metadata on the detail page?
Partial View with meta-tags
Hi,
Let's suppose I have a page with 10 products, when I click a button on one of the products it opens a pop-up (partial view) which has some share buttons. When I click 'Share on Facebook' it needs to have the correct meta-tags (title of the product, description of the product and image of the product). Is this possible? If so, how?
When you say popup, do you mean a physical new window (like target="_blank") with a new document, or an in page javascript modal?
I mean like a javascript modal. It can also be a View not necessarily partial.
Dynamically change (via JS) meta tags on popup show and revert it back on close?
Thanks for your help I made a 2 new views(one from controller one w/o, with umbraco template and document type) on share click I send to facebook the url for the new view which has head and tags. With JS/Ajax and the like it will never ever work, I have tried.
Ah understood, FB requests back this page and expects meta tags to be presented. Then yes JS will not work. And your solution seems reasonable.
As i understand the facebook sharing mechanism, it page based, so you cant "send" info to it. It loads info from the metadata on the page.
But if you have 10 products on the page, dont you have 10 detail pages about the individual products? Couldn't you share the url of the detail page? and then have the correct metadata on the detail page?
This is what I ended up doing.
Please mark the problem as solved.
is working on a reply...