Binary Image and Meta Tags for Facebook

2 posts, 0 answers
  1. Marty
    Marty avatar
    22 posts
    Member since:
    Feb 2008

    Posted 28 Mar 2011 Link to this post

    Hey guys, long time no post.   I have a RadBinaryImage and everything is working fine, but I want waht I render in HTML to work with AddThis - a plug for sharing to facebook.  Actually, FB does not recognize the image at all on the page.... I'm wondering what I can do to make this render the appropriate meta tags (I assume) do FB will pick this item image up and display it!  

    I think it has something to do with the relative path in SRC= or meta tags... actually - any help you can give to help me generate the meta tag description and source to make it show up in FB as a share.

    Hopefully you have come across this before, normally I would figure this out but I have to meet the love of my life and I have to drive an hour to see her. 

    thanks - huge Fan!
    Marty

     <telerik:RadBinaryImage runat="server" ID="RadBinaryImage1"
                            DataValue='<%#Eval("ImageContent") %>'
                            AutoAdjustImageControlSize="false"
                            ResizeMode="Fit"
                            CssClass="imageContainerLarge"/>

    HTML

     <div>
                            <img id="ctl00_DefaultContent_ImageViewer1_RadListView1_ctrl1_RadBinaryImage1" class="imageContainerLarge" src="../../../Telerik.Web.UI.WebResource.axd?imgid=5480abe542ac4e1e86b7733c8b2d586b&amp;type=rbi" />
                        </div>
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 31 Mar 2011 Link to this post

    I believe facebook requires an absolute image URL to be able to request the image from beyond the scope of your current HTML page. However, RadBinaryImage's generated src attribute uses a relative URL. If you can plug some custom javascript when the image URL is built or requested, you need to form an absolute URL by appending parts from document.location and the src of the rendered binary <img> tag.

    Veli
    the Telerik team
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top