1
I have a routine for consulting the last 50 posts:
FB.api('/me/friends?limit=10', function(response) {
var friend_data = response.data;
for(var i = 0; i < friend_data.length; i++) {
FB.api({
method: 'fql.query',
query: 'SELECT post_id, source_id, message FROM stream WHERE source_id = ' + friend_data[i].id + ' LIMIT 50'
},
function(posts){
console.log(posts);
}
});
}
});
It works perfectly until I get this error message:
"error_code":"613"
"error_msg":"Calls to stream have exceeded the rate of 600 calls per 600 seconds."
Of course, there is a lock on the number of queries, limited to 600 requests every 6 minutes. It may be that I’m not doing the accounts correctly, but this routine generates 1 request to fetch the 10 friends and another 10 requests stream, right?
Is there anything that can be done to get around this problem?
Have any reason to make more than one request per second on a page?
– utluiz
600 requests every 10 minutes. 600 seconds = 10 minutes.
– Felipe Avelar
The context in which your query exceeds the request limit is essential to the problem, please clarify.
– lolol
I changed the question to increase understanding.
– Alexandre Bonfá
@Alexandrebonfá The problem is still unclear. There are 11 requests, and as Facebook identifies you based on IP + TOKEN, this should work for all its users. If the problem is the user updating the list very often, then you should make the request in the backend and control with database when you should bring the database information and when you should make a new request after X minutes past the last.
– lolol