-1

Facebook 機能を使用したログインを実装するために、ここでfbconnect モジュールのチュートリアルに従っています

ユーザーモデルにこのアクションがあります

public static void facebookOAuthCallback(JsonObject data){
 String email = data.get("email").getAsString();
 User user = findByEmail(email);
if(user == null){
    user = new User();
    user.email = email;
    user.insert();
}
Session.current().put("user", user.email);
}

このエラーが発生します。何かをインポートする必要がありますか? ファイル /app/models/User.java をコンパイルできませんでした。発生したエラー: JsonObject を型に解決できません

何か案は

ありがとう

4

1 に答える 1

2

It looks as though you have a whole lot of imports missing. Easiest solution would be to use an IDE like IntelliJ, that has the playframework source files (/framework/src).

If you can't do this, then try looking up each issue you have, and searching for the related imports that you would need.

From your last comment, Session is actually an inner class of Http, so you need to import play.mvc.Http.

于 2012-07-11T23:12:54.100 に答える