我正在尝试在我的 Android 应用程序中从我的用户那里获得发布权限,并且我成功了,但是当我获得许可时,我想要一个回调来告诉我这一点。这是我的代码:
private void requestPublishPermissions(Session session) {
Log.d("", "Requesting Publish Permissions...");
if (session != null) {
List<String> publishPermissions = Arrays.asList("publish_actions", "publish_stream");
final int REAUTH_ACTIVITY_CODE = 100;
Session.NewPermissionsRequest reauthRequest = new Session.NewPermissionsRequest(this, publishPermissions).setRequestCode(REAUTH_ACTIVITY_CODE);
reauthRequest.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);
session.requestNewPublishPermissions(reauthRequest);
}
}
是否session.requestNewPublishPermissions(reauthRequest);
有回调或告诉我许可已被接受的东西?
感谢您的任何意见