我在我的onSessionStateChange
session.requestNewReadPermissions(new NewPermissionsRequest(this, Arrays.asList("user_photos")));
我得到这个错误:
java.lang.UnsupportedOperationException:会话:尝试为具有待处理请求的会话请求新权限。
这是onSessionStateChange
回调的完整代码。
private void onSessionStateChange(Session session, SessionState state, Exception exception)
{
if (state.isOpened())
{
Log.i(TAG, "Logged in...");
m_lblWelcome.setText("You are logged in :)");
session.requestNewReadPermissions(new NewPermissionsRequest(this, Arrays.asList("user_photos")));
//Request.executeMeRequestAsync(session, getCurrentLoggedInUser);
}
else if (state.isClosed())
{
Log.i(TAG, "Logged out...");
m_lblWelcome.setText("Why did you leave :(");
}
}
我在这里做错了什么?