我们运营一个URL缩短服务,在过去的一周左右,我们开始看到来自Facebook所有IP和用户代理facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)
的大量请求{normal url}/no_facebook_preview_picture.jpg
。
如果我在我的个人主页上发布一个普通链接到我们网站(设置为只有我
以进行测试),我会在访问日志中看到以下条目:
66.220.152.6 - - [05/Feb/2013:16:31:36 +0000] "GET /44_U HTTP/1.1" 200 1314 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "-"
然而,如果我发布的链接返回404或410(创建后删除垃圾链接),我会得到以下结果
69.171.237.15 - - [05/Feb/2013:16:49:16 +0000] "GET /notexistURL HTTP/1.1" 404 1319 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "-"
然后大约在一小时左右
173.252.110.113 - - [05/Feb/2013:17:15:15 +0000] "GET /notexistURL/no_facebook_preview_picture.jpg HTTP/1.1" 404 0 "-" "facebookexternalhit/1.0 (+http://www.facebook.com/externalhit_uatext.php)" "-"
该IP的WhoIs报告
NetName FACEBOOK-INC
NetHandle NET-173-252-64-0-1
所以这些IP地址肯定是Facebook的。
我们每天都会收到大约10-20个类似的请求,全部都是相同的。我们只能够获取7天内的日志记录,但这些请求发生在7天前。
我测试了唯一的链接,因此没有其他任何方式可以找到该链接。我个人并不经常使用Facebook,除了我的测试链接外,所有链接都是其他用户创建/发布的,但我认识我Facebook账户关联的所有应用程序,并且没有异常,因此我不认为这是第三方应用程序(如果需要,我可以提供一个列表,但它们都是知名的应用程序)。
在检查日志文件时,Facebook甚至似乎没有智能地创建这些请求,它只是盲目地将字符串/no_facebook_preview_picture.jpg
附加在URL末尾,即使有查询字符串也是如此。例如;
69.171.228.114 - - [05/Feb/2013:17:19:13 +0000] "GET /iAmNotARealURL1234777?ref=fb&cows_go=moo HTTP/1.1" 404 1118 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "-"
69.171.228.114 - - [05/Feb/2013:17:19:13 +0000] "GET /iamnotarealurl1234777 HTTP/1.1" 404 1118 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "-"
173.252.103.4 - - [05/Feb/2013:17:44:41 +0000] "GET /iAmNotARealURL1234777?ref=fb&cows_go=moo/no_facebook_preview_picture.jpg HTTP/1.1" 404 1118 "-" "facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)" "-"
Google显示了许多随机的结果,大多数来自链接发起者,但我找不到关于这些请求的任何信息。
这些请求是什么?Facebook需要它们做什么?这是我们应用程序中的错误还是可以安全地忽略这些请求?
更新:
有些日子我们现在会收到针对这些URL的2-3百个点击。
[sr@ns309372 nginx]$ for DAYLOG in `find ./ | grep "dftbashort.log-"`; do COUNT=`cat $DAYLOG | grep no_facebook_preview_picture | wc -l`; echo "${DAYLOG} has ${COUNT} occurences"; done
./dftbashort.log-20130201 has 0 occurences
./dftbashort.log-20130130 has 2 occurences
./dftbashort.log-20130129 has 2 occurences
./dftbashort.log-20130128 has 2 occurences
./dftbashort.log-20130202 has 378 occurences
./dftbashort.log-20130207 has 222 occurences
./dftbashort.log-20130205 has 257 occurences
./dftbashort.log-20130209 has 178 occurences
./dftbashort.log-20130131 has 2 occurences
./dftbashort.log-20130203 has 266 occurences
./dftbashort.log-20130206 has 667 occurences
./dftbashort.log-20130204 has 12 occurences
./dftbashort.log-20130127 has 4 occurences
./dftbashort.log-20130208 has 260 occurences
我们不提供任何开放图谱(meta tags)标签,页面除了一个meta/javascript重定向外没有任何内容。