Skip to content Skip to sidebar Skip to footer

Google Script Error - Urlfetchapp With Facebook Graph Api Brings To Many Urlfetch

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

Solution 1:

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.

Solution 2:

Try to increase the sleep time between every fetch request. You may do like do like this,

var sleepTime = Math.random()*1000;
Utilities.sleep(sleepTime);

Solution 3:

I added the 'useIntranet' option as a parameter to fetchResult and that seemed to solve the issue.

var options = {"useIntranet" : true};
var fetchResult = UrlFetchApp.fetch(fullURL, options);

Post a Comment for "Google Script Error - Urlfetchapp With Facebook Graph Api Brings To Many Urlfetch"