views:

48

answers:

1

Hello,

I would like to pull the share site thumbnail from:

http://www.facebook.com/share.php?u=my_website_url

inside the tag

<div class="UIThumbPager_Thumbs">

I would replace "my_website_url" with a given URL.

Thank you! :)

+1  A: 

OK, now I know what you want.

There is currently no API call to do this. The only thing I can suggest is scrape that URL the same way that they scrape a site to get that article.

I'm not sure how you are getting the URL you are going to use into your site. It might be hard if it's on the fly.

The best option is to scrape and store the image URL somewhere in a database.

The other option is for certain sites have a base image that you use if an image is not currently available for that article. i.e Have a generic Google or Digg image when the scrape is not ready on FB.

xiaohouzi79
Hi Xiao, thank you for your help. That is correct. I already have a URL called "item.link". I just need the thumbnail to display, not the share link. This doesn't seem to be working. Please let me know if you have anymore questions. Thank you!
jprim
@jprim Answer has now been edited please try again.
xiaohouzi79
Unfortunately this alternative still does not work for me. It is not loading anything. Are you testing it out on your end?
jprim
@jprim See latest edit with exact code I'm using to edit and screen shot indicating the result (image is injected inside the correct div and link has been created correctly).
xiaohouzi79
Oh sorry, there is a misunderstanding of which "image" I am talking about. I am talking about the thumbnail facebook pulls from the site. Ex:http://www.facebook.com/share.php?u=google.comimage is:http://www.google.com/intl/en_ALL/images/srpr/logo1w.pngThank you for your help, I really appreciate it :)
jprim
@jprim OK, now I know what you are after and the answer is there is no easy answer. FB doesn't currently have a function that can retrieve that information. The best thing you can do is to scrape that URL the same way that they scrape sites.
xiaohouzi79
That is what I thought. Would you be able to help me out with that? I asked that question here:http://stackoverflow.com/questions/3615983/grab-largest-image-on-site-given-the-urlI would really appreciate it. Thanks!
jprim