facebook-graph-api - Facebook 的 Open Graph 爬虫的 IP 地址范围是多少?

标签 facebook-graph-api

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

最佳答案

编辑

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

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

Facebook Scraper

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.

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,您还可以为防火墙使用用户代理。

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

When does Facebook scrape my page?

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

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.

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

关于facebook-graph-api - Facebook 的 Open Graph 爬虫的 IP 地址范围是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8859013/

相关文章:

ios - Social.framework Facebook 的可能性

facebook - Graph API 帖子上的 cURL 错误 [#60,CURLE_SSL_CACERT]

Facebook API : Determine if Facebook Page is published/unpublished

javascript - 我如何向玩家 friend 的时间线发送消息

api - 是否可以通过 Graph API 或其他编程方式访问 Open Graph Insights?

python - 从 flask 中的 url 获取 facebook 访问 token

javascript - 我在哪里可以学习如何为非 Canvas 应用程序/网站实现 "invite your facebook friends"对话框?

node.js - 在 FB 营销 api 中,有一个选项 export_format : 'csv' , 我如何下载 csv 文件?

ios - 我们可以通过编程方式从 iOS 应用程序向 Facebook Messenger 发送消息吗

javascript - 对象中的 graph.facebook 输出