-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Not easy to determinate Facebook.request(...) errors #11
Comments
Try using the Utils.parseJson() method: it will create a JSONObject from the response, or throw an exception is if the response is not JSON or contains an error. In designing the SDK, we opted to give developers maximum flexibility by returning the string representation of the request response, rather than some Object representation; in this way, the application can parse the string as it sees fit. |
OK if this is your choice... |
Nuget compression fix
Facebook.request(...) returns a String... not easy to determinate which type of error it is.
We have to parse the string to check if it contains: - "< HTML >", what means it is an HTTP error;
- "error_code" or "error", what means it is a Facebook error (JSON string).
Otherwise it is not an error and the string contains the id of the publication.
-> could Facebook.request(...) return an object instead of a string?
Thanks :)
The text was updated successfully, but these errors were encountered: