Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: ksperling/facebook-android-sdk
base: e49b788653
...
head fork: ksperling/facebook-android-sdk
compare: 4c7fb6ebb0
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Dec 18, 2011
@ksperling Handle error_code and error_msg parameters in return URLs.
A failed feed post returns those (there may be other endpoints that use them).
cb86c04
@ksperling Merge branch 'error_parsing' 4c7fb6e
Showing with 7 additions and 4 deletions.
  1. +7 −4 facebook/src/com/facebook/android/FbDialog.java
View
11 facebook/src/com/facebook/android/FbDialog.java
@@ -164,9 +164,11 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
Bundle values = Util.parseUrl(url);
String error = values.getString("error");
- if (error == null) {
- error = values.getString("error_type");
- }
+ String errorType = values.getString("error_type");
+ String errorMsg = values.getString("error_msg");
+ String errorCode = values.getString("error_code");
+ if (error == null) error = errorMsg;
+ if (error == null) error = errorType;
if (error == null) {
mListener.onComplete(values);
@@ -174,7 +176,8 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {
error.equals("OAuthAccessDeniedException")) {
mListener.onCancel();
} else {
- mListener.onFacebookError(new FacebookError(error));
+ mListener.onFacebookError(new FacebookError(error, errorType,
+ (errorCode != null) ? Integer.parseInt(errorCode) : 0));
}
FbDialog.this.dismiss();

No commit comments for this range

Something went wrong with that request. Please try again.