Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ConnectPlugin android should return error if trying to login or other…

… stuff before calling init
  • Loading branch information...
commit 76ea6980c4b52c04ff9e473c7145b5052bf4eaf1 1 parent 1246bdf
@filmaj filmaj authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 native/android/src/com/phonegap/facebook/ConnectPlugin.java
View
4 native/android/src/com/phonegap/facebook/ConnectPlugin.java
@@ -135,12 +135,16 @@ else if (action.equals("logout")) {
pr = new PluginResult(PluginResult.Status.IO_EXCEPTION, "Error logging out.");
}
pr = new PluginResult(PluginResult.Status.OK, getResponse());
+ } else {
+ pr = new PluginResult(PluginResult.Status.ERROR, "Must call init before logout.");
}
}
else if (action.equals("getLoginStatus")) {
if (facebook != null) {
pr = new PluginResult(PluginResult.Status.OK, getResponse());
+ } else {
+ pr = new PluginResult(PluginResult.Status.ERROR, "Must call init before getLoginStatus.");
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.