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

Use batch requests in get_objects #271

Closed
vionemc opened this issue Feb 22, 2016 · 4 comments
Closed

Use batch requests in get_objects #271

vionemc opened this issue Feb 22, 2016 · 4 comments

Comments

@vionemc
Copy link

vionemc commented Feb 22, 2016

I want to make a bulk request using get_objects, but if some of the ID doesn't exist, even though other IDs exist, the whole bulk request fails. It's annoying.

When I run this: graph.get_objects(ids=['maxlibin','upwork', 'watcfy'])
Currently I'll just get error 803
facebook.GraphAPIError: (#803) Cannot query users by their username (maxlibin)

I hope you'll give response like:

{
'maxlibin': '(#803) Cannot query users by their username (maxlibin)',
'upwork':{}, #The successful result
'watcfy':{} #The successful result
}
@martey
Copy link
Member

martey commented Feb 23, 2016

Since this is partially a problem with the Graph API and not this particular library, I was going to advise you to report this upstream, but I see you already did at https://developers.facebook.com/bugs/1000666673351426/.

Facebook's suggestion to use batch requests is what I would have suggested as well. Feel free to submit a pull request making changes to get_objects.

@martey martey changed the title Ignore error in bulk request Use batch requests in get_objects Feb 23, 2016
@vionemc
Copy link
Author

vionemc commented Feb 24, 2016

OK! Well, I hope Facebook Team will hear my suggestion in the future. It will be nice to save rate limit

@vionemc
Copy link
Author

vionemc commented Feb 24, 2016

I don't think it's a good idea to change get_objects to batch request. Like what I said before, rate limit problem.

@martey
Copy link
Member

martey commented Apr 14, 2016

Closing, since adding support for batch requests to get_objects is a duplicate of #28 (which shouldn't cause rate limiting unless you are using the API in a way that Facebook does not like).

@martey martey closed this as completed Apr 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants