Facebook 的 Open Graph 爬虫的 IP 地址范围是多少? [英] What's the IP address range of Facebook's Open Graph crawler?

查看:25
本文介绍了Facebook 的 Open Graph 爬虫的 IP 地址范围是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了在我们的预览环境中测试 Open Graph API,我们需要在我们的防火墙中戳一个洞,以允许 Facebook 抓取我们的对象页面.我们应该允许哪些 IP 范围?

In order to test the Open Graph API on our preview environment, we need to poke a hole in our firewall to allow Facebook to scrape our object pages. What IP ranges should we allow?

推荐答案

EDIT

Facebook 一直表现出一些爱心,现在正在向任何人公开 IP 块

Facebook has been showing some love and is now making the IP block public for anyone to have

http://developers.facebook.com/docs/ApplicationSecurity/#facebook_scraperhttps://developers.facebook.com/docs/sharing/best-practices#crawl

Facebook 爬虫

许多平台服务,例如社交插件和开放Graph 要求我们的系统能够访问您的网页.我们认识到在某些情况下您可能不想要这些公共 Internet 上的页面、测试期间或出于其他安全目的原因.

A number of Platform services such as Social Plugins and the Open Graph require our systems to be able to reach your Web Pages. We recognize that there are situations where you might not want these pages on the public Internet, during testing or for other security reasons.

为此,您应该在安全方面设置例外系统允许 Facebook 通过添加以下 IP 范围,截至 2012 年 4 月准确.

To facilitate this, you should make exceptions in your security systems to allow Facebook to scrape these pages by adding the following IP ranges, accurate as of April 2012.

31.13.24.0/21
31.13.64.0/18
66.220.144.0/20
69.63.176.0/20
69.171.224.0/19
74.119.76.0/22
103.4.96.0/22
173.252.64.0/18
204.15.20.0/22

<小时>

除了 IP,您还可以为防火墙使用用户代理.


Instead of IP, you can also use the user agent for your firewall.

http://developers.facebook.com/docs/reference/plugins/like/

Facebook 何时抓取我的页面?

Facebook 需要抓取您的页面才能知道如何显示它网站.

Facebook needs to scrape your page to know how to display it around the site.

Facebook 每 24 小时抓取您的页面以确保属性最新.当 Open Graph 的管理员时,该页面也会被抓取页面点击 Like 按钮,当 URL 输入到Facebook URL Linter.Facebook 会观察您 URL 上的缓存标头 - 它将按优先顺序查看Expires"和Cache-Control".但是,即使您指定更长的时间,Facebook 也会抓取您的每 24 小时翻页.

Facebook scrapes your page every 24 hours to ensure the properties are up to date. The page is also scraped when an admin for the Open Graph page clicks the Like button and when the URL is entered into the Facebook URL Linter. Facebook observes cache headers on your URLs - it will look at "Expires" and "Cache-Control" in order of preference. However, even if you specify a longer time, Facebook will scrape your page every 24 hours.

scraper 的用户代理是:"facebookexternalhit/1.1(+http://www.facebook.com/externalhit_uatext.php)"

The user agent of the scraper is: "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)"

这篇关于Facebook 的 Open Graph 爬虫的 IP 地址范围是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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