playframework - JSON Object Error in JAVA -


Hey I'm following the fbconnect module tutorial to implement login with Facebook functionality

I have this verb my user model

  public static zero facebookOAuthCallback (JsonObject data) {string email = data. Get ("email"). GetAsString (); User user = findByEmail (email); If (user == tap) {user = new user (); User.email = email; User.insert (); } Session curent (). Put ("user", user.email); }   

I get this error Do I need to import something? The file /app/models/User.java could not be compiled. Error has been raised: JasonAbject can not be solved by a type

Any idea

thanks

It seems that you have many import unavailable, the easiest solution would be to use an IDE such as IntelliJ, in which the playframework source files (/ framework / src ) is.

If you can not do this, try to find out every problem, and you will need to find related imports.

With your previous comment, session is actually an internal class of HTPP, so you have to import play.mvc.Http .

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -