Facebook Like Issue
-
- Lieutenant Commander (LCDR)
- Posts: 92
- Joined: Thu Jul 10, 2008 11:43 am
- Location: Lancaster PA
- Contact:
Facebook Like Issue
I have noticed when liking a product, via able 7.0.7, it is not selecting the product image, but an image from the MORE ITEMS section of the page. Is there a way to have it use the actual product image?
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 27
- Joined: Fri Feb 05, 2010 9:37 am
- Location: Myrtle Beach, South Carolina
- Contact:
Re: Facebook Like Issue
You can force Facebook to use a specific image, as well as specify other pertinent information about the page by using the Facebook Open Graph Tags. Use the following link for more information. http://developers.facebook.com/docs/ref ... gins/like/
You can include these Tags in the header of your project page with a simple modification to your Products.aspx file.
This is just an example of how I set mine up.
You can include these Tags in the header of your project page with a simple modification to your Products.aspx file.
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
if (_Product != null)
{
if (!Page.IsPostBack)
//REGISTER THE PAGEVIEW
CommerceBuilder.Reporting.PageView.RegisterCatalogNode(_Product.ProductId, CatalogNodeType.Product);
PageHelper.BindMetaTags(this, _Product);
Page.Title = _Product.Name;
//BEGIN Add Facebook Open Graph Tags to Page Header
string facebookTitle = _Product.Name;
string facebookType = "product";
string facebookImage = _Product.ThumbnailUrl.Replace("~", "http://www.yoursite.com");
string facebookUrl = _Product.NavigateUrl.Replace("~", "http://www.yoursite.com");
string facebookSiteName = "YourSiteName";
string facebookAdmin = "FacebookPageAdministratorName";
Page.Header.Controls.Add(new LiteralControl("\r\r<meta property=\"og:title\" content=\"" + facebookTitle + "\"/>\r"));
Page.Header.Controls.Add(new LiteralControl("<meta property=\"og:type\" content=\"" + facebookType + "\"/>\r"));
Page.Header.Controls.Add(new LiteralControl("<meta property=\"og:image\" content=\"" + facebookImage + "\"/>\r"));
Page.Header.Controls.Add(new LiteralControl("<meta property=\"og:url\" content=\"" + facebookUrl + "\"/>\r"));
Page.Header.Controls.Add(new LiteralControl("<meta property=\"og:site_name\" content=\"" + facebookSiteName + "\"/>\r"));
Page.Header.Controls.Add(new LiteralControl("<meta property=\"fb:admins\" content=\"" + facebookAdmin + "\"/>\r\r"));
//END Add Facebook Open Graph Tags to Page Header
}
}
Jamin' Leather Catalog Outlet
http://www.jaminleather.com
http://www.jaminleather.com
Re: Facebook Like Issue
You will need to use the open graph protocol for this. Default 7.0.7 implementation does not do that. You can use the alternate free implementation of FaceBook like widget that takes care of this and more.
http://blog.plugables.com/featured/2202 ... ecommerce/
http://www.plugables.com/Facebook-Like-Widget-P21.aspx
http://blog.plugables.com/featured/2202 ... ecommerce/
http://www.plugables.com/Facebook-Like-Widget-P21.aspx
Last edited by plugables on Tue May 17, 2011 1:48 am, edited 1 time in total.
Re: Facebook Like Issue
how do i add the send button the the plubables "like" button plugin? tried adding "&send=true" after the {0}, but to no avail. thanks in advance.
Re: Facebook Like Issue
send button ???dduchene wrote:how do i add the send button the the plubables "like" button plugin? tried adding "&send=true" after the {0}, but to no avail. thanks in advance.
-
- Lieutenant, Jr. Grade (LT JG)
- Posts: 42
- Joined: Fri Apr 15, 2011 11:04 pm
Re: Facebook Like Issue
Integrated this today - Thank you!!
Question - I have been testing with the facebook url linter (http://developers.facebook.com/tools/lint), and for the description of the product, it doesn't seem to be pulling any text from the description field of the current product, but rather it's pulling the name and price from the first product in the 'Top Sellers' control which I have in the right sidebar. Any thoughts regarding this? Again, thanks for providing this control for free!
Question - I have been testing with the facebook url linter (http://developers.facebook.com/tools/lint), and for the description of the product, it doesn't seem to be pulling any text from the description field of the current product, but rather it's pulling the name and price from the first product in the 'Top Sellers' control which I have in the right sidebar. Any thoughts regarding this? Again, thanks for providing this control for free!
Jason Hendee
Cables for Less
Cables for Less