Skip to content

Commit

Permalink
Attempt to fix the common error "Please reduce the amount of data you…
Browse files Browse the repository at this point in the history
…'re asking for, then retry your request". This usually happens on the /videos edge.
  • Loading branch information
stefansundin committed Jul 29, 2017
1 parent 782b37a commit 704f965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.rb
Expand Up @@ -414,7 +414,7 @@
"photos" => "updated_time,from,message,description,name,link,source",
}[@edge]

response = FacebookParty.get("/#{id}/#{@edge}", query: { fields: fields })
response = FacebookParty.get("/#{id}/#{@edge}", query: { fields: fields, since: Time.now.to_i-365*24*60*60 }) # date -v -1w +%s
raise FacebookError.new(response) if !response.success?

@data = response.parsed_response["data"]
Expand Down

0 comments on commit 704f965

Please sign in to comment.