Hi!
I have a big problem for me with the like button for Facebook. I have a products page where i have a like button and to reach this page you need to be logged in.
I fill the meta data with this method:
private void LoadMetaTagsForFacebook()
{
HtmlMeta meta = new HtmlMeta();
meta.Attributes.Add("property", "fb:app_id");
meta.Attributes.Add("content", "");
Page.Header.Controls.Add(meta);
meta = new HtmlMeta();
meta.Attributes.Add("property", "og:url");
meta.Attributes.Add("content", Request.Url.ToString());
Page.Header.Controls.Add(meta);
meta = new HtmlMeta();
meta.Attributes.Add("property", "og:site_name");
meta.Attributes.Add("content", "Site.com");
Page.Header.Controls.Add(meta);
meta = new HtmlMeta();
meta.Attributes.Add("property", "og:title");
meta.Attributes.Add("content", this._product.Name);
Page.Header.Controls.Add(meta);
meta = new HtmlMeta();
meta.Attributes.Add("property", "og:image");
meta.Attributes.Add("content", this._product.ImagePath);
Page.Header.Controls.Add(meta);
meta = new HtmlMeta();
meta.Attributes.Add("property", "og:type");
meta.Attributes.Add("content", "drink");
Page.Header.Controls.Add(meta);
}
When i run the facebook debugger i get this error:
Inferred Property: The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property: The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property: The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property: The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
1. When i look at the page source on the site the meta tags is right.. do i have to add the meta tags in a other way? How do i do that?
2. I also get a error (302) because i have a redirect path (you have to be logged in to see the page). What´s the solution for this?
I would be very happy for an answear, i have spent 4 hours searching and trying.
Thanks alot!