Facebook graph api Facebook graph api错误UrlFetch失败,因为向指定URL发送的流量过多

Facebook graph api Facebook graph api错误UrlFetch失败,因为向指定URL发送的流量过多,facebook-graph-api,google-apps-script,Facebook Graph Api,Google Apps Script,我正在尝试从谷歌脚本中使用Facebook图形api获取Facebook广告营地 我有将近5500个数据,我试图每10分钟获取一次数据,并将更新后的数据添加到电子表格中 代码运行良好。但是在2-3次迭代之后,我得到了一个错误 UrlFetch failed because too much traffic is being sent to the specified URL 如果我再次与其他电子邮件共享我的谷歌脚本,它将在下一次2-3次迭代中工作,然后再次失败 我得到了一个解决方案,可以在从中

我正在尝试从谷歌脚本中使用Facebook图形api获取Facebook广告营地

我有将近5500个数据,我试图每10分钟获取一次数据,并将更新后的数据添加到电子表格中

代码运行良好。但是在2-3次迭代之后,我得到了一个错误

UrlFetch failed because too much traffic is being sent to the specified URL
如果我再次与其他电子邮件共享我的谷歌脚本,它将在下一次2-3次迭代中工作,然后再次失败

我得到了一个解决方案,可以在从中获取数据时添加一个额外的选项

但在添加选项之后

{"useIntranet" : true}
我收到请求超时问题


是否有其他解决方案来解决此问题?我需要在一天中每10分钟提取一次数据。

这不是您的电话问题,而是您正在拨打的电话数量。你可能需要减少一点。如您所见,限制是每600秒(10分钟)拨打600个电话。因此,取决于您获取的内容、方式和数量,尽管我觉得您的描述足以让我确信,您能够进行2-3次迭代的原因是,在第三次迭代结束时,您已经超过了每秒1次的呼叫速率,并且基本上将您与之隔绝


我还建议您查看一下这篇文章,了解更多与Facebook Graph API相关的限速信息。

这不是您的通话问题,而是您的通话次数。你可能需要减少一点。如您所见,限制是每600秒(10分钟)拨打600个电话。因此,取决于您获取的内容、方式和数量,尽管我觉得您的描述足以让我确信,您能够进行2-3次迭代的原因是,在第三次迭代结束时,您已经超过了每秒1次的呼叫速率,并且基本上将您与之隔绝


我还建议您查看一下这篇文章,了解更多与Facebook Graph API相关的限速信息。

这不是您的通话问题,而是您的通话次数。你可能需要减少一点。如您所见,限制是每600秒(10分钟)拨打600个电话。因此,取决于您获取的内容、方式和数量,尽管我觉得您的描述足以让我确信,您能够进行2-3次迭代的原因是,在第三次迭代结束时,您已经超过了每秒1次的呼叫速率,并且基本上将您与之隔绝


我还建议您查看一下这篇文章,了解更多与Facebook Graph API相关的限速信息。

这不是您的通话问题,而是您的通话次数。你可能需要减少一点。如您所见,限制是每600秒(10分钟)拨打600个电话。因此,取决于您获取的内容、方式和数量,尽管我觉得您的描述足以让我确信,您能够进行2-3次迭代的原因是,在第三次迭代结束时,您已经超过了每秒1次的呼叫速率,并且基本上将您与之隔绝


我还建议您看看这篇文章,了解更多与Facebook Graph API相关的速率限制信息。

在对代码进行更多操作后,我得到了fb Graph API的限制,比如每600秒(10分钟)调用600次。但从谷歌应用程序脚本调用fb graph api的限制比它小得多。这就是为什么当我在每10分钟内使用jQuery Ajax加载数据时效果很好,但当我使用

UrlFetchApp.fetch
在谷歌应用程序脚本中,它会在一天内尝试2-3次后阻止我

因此,由于谷歌应用程序脚本对fb-graph-api的限制,我尝试调用其他一些api,而不是fb-graph-api,它成功了,但没有阻止我

因此,我创建了一个节点js服务器,如:-

var express = require("express"),
app = express(),
cors = require('cors'),
bodyParser = require('body-parser'),
request = require('request');
app.use(cors());

app.use( bodyParser.json() );       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({     // to support URL-encoded bodies
  extended: true
})); 

app.get("/test",function(req,res){
  res.send("Test success");
})
app.post('/getFbFeed', function(req, res) {
  // Sending request to fb api using the request modules of node, the fb  feed url is coming from
  // the frontend as a request parameter.
   request(req.body.url, function (error, response, body) {
      if (!error && response.statusCode == 200) {
        res.send(body); // Send the response of the requested url to the frontend.
      }
  })
})
app.listen(process.env.PORT || 3000);
因此,这段代码将从fb graph api加载数据,我将从google应用程序脚本发送fb graph api的url

所以,在我写的谷歌应用程序脚本中

var options =
  {
   "method" : "post",
   "payload" : {"url" : url}
  };
 // Sending post request to node js server with the fb feed url to load data as there is limit to load data from fb to google apps script.
  response = UrlFetchApp.fetch("http://fbfeed-48431.onmodulus.net/getFbFeed",options);

在更多地使用代码之后,我得到的是fb graph api的限制,比如每600秒(10分钟)调用600次。但从谷歌应用程序脚本调用fb graph api的限制比它小得多。这就是为什么当我在每10分钟内使用jQuery Ajax加载数据时效果很好,但当我使用

UrlFetchApp.fetch
在谷歌应用程序脚本中,它会在一天内尝试2-3次后阻止我

因此,由于谷歌应用程序脚本对fb-graph-api的限制,我尝试调用其他一些api,而不是fb-graph-api,它成功了,但没有阻止我

因此,我创建了一个节点js服务器,如:-

var express = require("express"),
app = express(),
cors = require('cors'),
bodyParser = require('body-parser'),
request = require('request');
app.use(cors());

app.use( bodyParser.json() );       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({     // to support URL-encoded bodies
  extended: true
})); 

app.get("/test",function(req,res){
  res.send("Test success");
})
app.post('/getFbFeed', function(req, res) {
  // Sending request to fb api using the request modules of node, the fb  feed url is coming from
  // the frontend as a request parameter.
   request(req.body.url, function (error, response, body) {
      if (!error && response.statusCode == 200) {
        res.send(body); // Send the response of the requested url to the frontend.
      }
  })
})
app.listen(process.env.PORT || 3000);
因此,这段代码将从fb graph api加载数据,我将从google应用程序脚本发送fb graph api的url

所以,在我写的谷歌应用程序脚本中

var options =
  {
   "method" : "post",
   "payload" : {"url" : url}
  };
 // Sending post request to node js server with the fb feed url to load data as there is limit to load data from fb to google apps script.
  response = UrlFetchApp.fetch("http://fbfeed-48431.onmodulus.net/getFbFeed",options);

在更多地使用代码之后,我得到的是fb graph api的限制,比如每600秒(10分钟)调用600次。但从谷歌应用程序脚本调用fb graph api的限制比它小得多。这就是为什么当我在每10分钟内使用jQuery Ajax加载数据时效果很好,但当我使用

UrlFetchApp.fetch
在谷歌应用程序脚本中,它会在一天内尝试2-3次后阻止我

因此,由于谷歌应用程序脚本对fb-graph-api的限制,我尝试调用其他一些api,而不是fb-graph-api,它成功了,但没有阻止我

因此,我创建了一个节点js服务器,如:-

var express = require("express"),
app = express(),
cors = require('cors'),
bodyParser = require('body-parser'),
request = require('request');
app.use(cors());

app.use( bodyParser.json() );       // to support JSON-encoded bodies
app.use(bodyParser.urlencoded({     // to support URL-encoded bodies
  extended: true
})); 

app.get("/test",function(req,res){
  res.send("Test success");
})
app.post('/getFbFeed', function(req, res) {
  // Sending request to fb api using the request modules of node, the fb  feed url is coming from
  // the frontend as a request parameter.
   request(req.body.url, function (error, response, body) {
      if (!error && response.statusCode == 200) {
        res.send(body); // Send the response of the requested url to the frontend.
      }
  })
})
app.listen(process.env.PORT || 3000);
因此,这段代码将从fb graph api加载数据,我将从google应用程序脚本发送fb graph api的url

所以,在我写的谷歌应用程序脚本中

var options =
  {
   "method" : "post",
   "payload" : {"url" : url}
  };
 // Sending post request to node js server with the fb feed url to load data as there is limit to load data from fb to google apps script.
  response = UrlFetchApp.fetch("http://fbfeed-48431.onmodulus.net/getFbFeed",options);

在更多地使用代码之后,我得到的是fb graph api的限制,比如每600秒(10分钟)调用600次。但是,从谷歌应用程序调用fb graph api的局限性令人担忧