本文介绍了为Facebook图表提出了很多要求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 基本上我在网站上启用了Facebook的评论插件。 现在用graph.facebook.com我想索引那些评论。为了做到这一点,我可以解析下面给出的json: http://graph.facebook.com/comments/?ids= [myurl] 问题是我会发送很多请求(每个页面有1个fb评论插件) 有没有办法做这样的操作,而不会遇到洪水控制?解决方案您可以使用Graph API中的多个网址(由分隔,)获取几个对象的数据,如下所示: $ a $ b要覆盖网址长度限制,您可以发出POST请求并传递 ids 不在网址中: POST http://graph.facebook.com/comments/?method=get POST数据:ids = [myurl],[myurl2],[myurln] Basically I enabled the facebook comment plugin on a website.Now with graph.facebook.com I would like to index those comment. To do that I can parse the json given by:http://graph.facebook.com/comments/?ids=[myurl]The problem is that I will send a lot of request (1 for each page that has the fb comment plugins)Is there a way to do such operation without encountering a flood control? 解决方案 You can use multiple urls (separated by ,) to the Graph API to get data for several objects like this:GET http://graph.facebook.com/comments/?ids=[myurl],[myurl2],[myurln]To override limit on url length you can issue POST request and passing ids not in the url:POST http://graph.facebook.com/comments/?method=getPOST DATA: ids=[myurl],[myurl2],[myurln] 这篇关于为Facebook图表提出了很多要求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-24 19:06