Facebook Like Issue

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
SamsSteins
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 92
Joined: Thu Jul 10, 2008 11:43 am
Location: Lancaster PA
Contact:

Facebook Like Issue

Post by SamsSteins » Thu Apr 21, 2011 9:30 am

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?

JaminLeather
Lieutenant, Jr. Grade (LT JG)
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

Post by JaminLeather » Thu Apr 21, 2011 10:34 am

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.

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
        }
    }
This is just an example of how I set mine up.
Jamin' Leather Catalog Outlet
http://www.jaminleather.com

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Facebook Like Issue

Post by plugables » Fri May 13, 2011 7:17 am

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
Last edited by plugables on Tue May 17, 2011 1:48 am, edited 1 time in total.

dduchene
Ensign (ENS)
Ensign (ENS)
Posts: 2
Joined: Fri Jan 22, 2010 3:33 pm

Re: Facebook Like Issue

Post by dduchene » Fri May 13, 2011 1:00 pm

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.

plugables
Captain (CAPT)
Captain (CAPT)
Posts: 276
Joined: Sat Aug 15, 2009 4:04 am
Contact:

Re: Facebook Like Issue

Post by plugables » Mon May 16, 2011 11:02 am

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.
send button ???

jasonhendee
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 42
Joined: Fri Apr 15, 2011 11:04 pm

Re: Facebook Like Issue

Post by jasonhendee » Fri May 20, 2011 10:53 am

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!
Jason Hendee
Cables for Less

Post Reply