从Facebook提取分享缩略图给定的URL [英] Pulling share thumbnail given URL from Facebook

查看:212
本文介绍了从Facebook提取分享缩略图给定的URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从以下位置提取共享网站缩略图:

I would like to pull the share site thumbnail from:

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

< div class =UIThumbPager_Thumbs>

我会用给定的URL替换my_website_url。

I would replace "my_website_url" with a given URL.

谢谢! :)

推荐答案

好的,现在我知道你想要什么了。

OK, now I know what you want.

目前没有API调用来执行此操作。我唯一可以建议的是刮掉网址的方式与他们抓取网站获取该文章的方式相同。

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.

最好的选择是将图像URL刮到并存储在数据库中的某个位置。

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

另一个选项是某些网站有一个基本图像,如果图像当前不适用于该文章,则使用该图像。即在FB上没有准备就绪时,请使用通用的Google或Digg图像。

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.

这篇关于从Facebook提取分享缩略图给定的URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆