我想使用 Facebook 登录我的应用程序,但我的 Logcat 收到了下一条消息:
Failed to find provider info for com.facebook.katana.provider.PlatformProvider
并且启动器不加载。我得到这样的哈希键。
我的代码是:
case R.id.btn_start_facebook:
// callback when session changes state
// start Facebook Login
Session.openActiveSession(this, true, new Session.StatusCallback() {
// callback when session changes state
@Override
public void call(Session session, SessionState state,
Exception exception) {
if (session.isOpened()) {
// make request to the /me API
Request.executeMeRequestAsync(session,
new Request.GraphUserCallback() {
// callback after Graph API response
// with user object
@Override
public void onCompleted(GraphUser user,
Response response) {
if (user != null) {
Log.d("myDebug",
"Hello " + user.getName()
+ " user id = "
+ user.getId()
+ "!");
} else {
Log.d("myDebug", "User is null");
}
}
});
}
}
});