Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Koala::Facebook::ServerError on requesting for higher limit of IG posts #656

Open
inmar-mohan opened this issue Jul 7, 2021 · 2 comments

Comments

@inmar-mohan
Copy link

inmar-mohan commented Jul 7, 2021

Hi there,
Thanks for this awesome gem. We are using Koala gem for fetching Instagram posts.
When requesting a higher limit of IG posts(limit: 500 above), we are getting Koala::Facebook::ServerError, however, we are not getting any errors when the limit is lower(limit: 300 below).

irb(main):015:0> MEDIA_FIELDS = %i[comments_count shortcode ig_id timestamp media_typelike_count media_url thumbnail_url username caption permalink].freeze
=> [:comments_count, :shortcode, :ig_id, :timestamp, :media_typelike_count, :media_url, :thumbnail_url, :username, :caption, :permalink]

irb(main):018:0>       koala.get_connection(uid, 'media', fields: MEDIA_FIELDS, limit: 1000)
Traceback (most recent call last):
        1: from (irb):18
Koala::Facebook::ServerError (type: OAuthException, code: 2, message: An unexpected error has occurred. Please retry your request later. [HTTP 500])

irb(main):019:0>       koala.get_connection(uid, 'media', fields: MEDIA_FIELDS, limit: 200)
=> [{"comments_count"=>39, "shortcode"=>"CQ_5

However, when requesting in Graph API explorer with a limit of 1000, we see no errors. The Graph API Explorer is returning all 1000 IG posts.
We have been fetching the IG posts with a limit of 1000 last couple of years with Koala gem, but we are receiving this error last 3 days.

Could someone please look into the issue? Please let me know if you need additional information. Any help or suggestions would be much appreciated.

Thanks

@inmar-mohan inmar-mohan changed the title Koala::Facebook::ServerError on requesting for high limit of IG posts Koala::Facebook::ServerError on requesting for higher limit of IG posts Jul 7, 2021
@ylecuyer
Copy link
Collaborator

ylecuyer commented Jul 7, 2021

Hello,

This error is not related to the gem, this is on the facebook side of the API.

Please do report on the facebook bugtracker with a saved session from the graph api explorer to get help from the facebook team https://developers.facebook.com/support/bugs/ (this gem isn't affiliated with facebook)

Regards

@inmar-mohan
Copy link
Author

Thanks for the quick reply, @ylecuyer. Sure, I will report on the Facebook bug tracker.

For additional information, we are not getting this error when requesting from graph API explorer even for 10,000 posts.
Screen Shot 2021-07-07 at 7 51 33 PM

We are getting this error only from fetching the posts from Koala gem. Just thinking what if Facebook says that this issue is not related to them since the Graph API explorer is working fine even for 10,000 posts and the issue is coming after querying only with the Koala gem. Anyways, I will report the bug to Facebook and update you if I have any solutions from them. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants