Google脚本错误 - 具有Facebook Graph Api的UrlFetchApp带来了许多urlfetch [英] Google Script Error - UrlFetchApp with Facebook Graph Api brings to many urlfetch
问题描述
我写了简单的代码,从Facebook图表获取一些信息api
i wrote simple code to get some information from the facebook graph api
function event_host(url) {
Utilities.sleep(1000);
var access_token = "xxx";
var jsondata = UrlFetchApp.fetch("https://graph.facebook.com/"+url+"?access_token="+access_token);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.owner.name;
//ERROR too many urlfetch oder invoked to many times...
}
它工作喜欢一个小时左右的魅力 - 比停止使用ERROR消息:Fehler:Fehler beim URL-Abruf,da zu viele Anfragen an die angegebene URL gesendet werden。
It worked liked a charme for an hour or so - than it stopped working with the ERROR Message: Fehler: Fehler beim URL-Abruf, da zu viele Anfragen an die angegebene URL gesendet werden.
无法调用URL,到很多url抓取。
Failure calling the URL, to many url fetch.
我试图把Utilities.sleep - 但是没有帮助。
任何想法我如何解决这个问题?
I tried to put "Utilities.sleep - but that did not help. Any Idea how i can solve that problem?
提前感谢
推荐答案
Facebook由于某些原因阻止了Google脚本的提取请求。作为解决方法,您可以使用某种代理服务,Facebook可以使用它。
Facebook for some reason blocks the fetch requests from Google Scripts. As a workaround, you may use some sort of proxy service and Facebook would allow it.
这篇关于Google脚本错误 - 具有Facebook Graph Api的UrlFetchApp带来了许多urlfetch的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!