I use this in my onSessionStateChange
session.requestNewReadPermissions(new NewPermissionsRequest(this, Arrays.asList("user_photos")));
and i get this error:
java.lang.UnsupportedOperationException: Session: an attempt was made to request new permissions for a session that has a pending request.
here is the full code of the onSessionStateChange
callback.
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 :(");
}
}
What am i doing wrong here ?