什么是Session.ReauthorizeRequest的替代品?

时间:2012-12-20 18:26:08

标签: facebook authentication facebook-android-sdk

在最终的3.0 SDK中,ReauthorizeRequest类已经消失。如何替换以下代码?

Session.ReauthorizeRequest request = new Session.ReauthorizeRequest(this, PERMISSIONS);
request.setRequestCode(REAUTHORIZE_ACTIVITY);
request.setLoginBehavior(SessionLoginBehavior.SSO_WITH_FALLBACK);
request.setCallback(this);
session.reauthorizeForPublish(request);

1 个答案:

答案 0 :(得分:8)

他们现在正在使用NewPermissionsRequest。 点击此处:https://developers.facebook.com/docs/reference/android/3.0/Session

Session.NewPermissionsRequest request = new Session.NewPermissionsRequest(this, PERMISSIONS);
request.setRequestCode(REAUTHORIZE_ACTIVITY);
request.setLoginBehavior(SessionLoginBehavior.SSO_WITH_FALLBACK);
request.setCallback(this);
session.requestNewPublishPermissions(request);