murz/play-fbconnect — Issue #13: findForFacebookOAuth method mentioned, not exists
Author: ahmetalpbalkan
Created: 2011-11-16 21:39:36+00:00
State: open

When my application tries to authenticate to Facebook, code throws an `InvocationTargetException` at `FBConnect.java` and code steps into

[...]
}catch(InvocationTargetException e){
throw new UnexpectedException("Module fbconnect encountered an error while calling your model's findForFacebookOAuth: "+e.getMessage());
}

and throws the exception. (Interestingly, `e.getMessage()` is null at this point. Maybe that InvTargetExceptn does not have a message?)

Then I found out that the method name `findForFacebookOAuth` (mentioned in exception) does not exist in the code at all (I grepped) and probably it is `facebookOAuthCallback` that you mentioned in line

Method method = model.getMethod("facebookOAuthCallback", new Class[] { JsonObject.class });

Interestingly I have a method in the User model class that I configured that matches what the plugin requires.

public static void facebookOAuthCallback(JsonObject data)

However I still get that exception. A bug?