This is a migrated thread and some comments may be shown as answers.

Binary Image and Meta Tags for Facebook

1 Answer 65 Views
BinaryImage
This is a migrated thread and some comments may be shown as answers.
Marty
Top achievements
Rank 1
Marty asked on 29 Mar 2011, 03:33 AM
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>

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 31 Mar 2011, 04:42 PM
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
Tags
BinaryImage
Asked by
Marty
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or