2015-05-17 60 views

回答

3

Found it

人們只能授予你問,除了 的公衆形象,這是在登錄時授予的權限的子集。

的人也可以在他們登錄後隨時撤銷授予在Facebook的 接口你的應用程序的權限,所以你的應用程序應該 定期檢查其權限已被授予。我們爲您提供 方法來檢查您的應用目前授予 的權限。

要獲得與當前訪問 令牌相關聯的權限列表,請致電:

AccessToken.getCurrentAccessToken().getPermissions() 

注意AccessToken.getCurrentAccessToken()可以爲空

0

全成登錄調用此方法後

enter image description here

new GraphRequest(
     AccessToken.getCurrentAccessToken(), 
     "/{user-id}/permissions", 
     null, 
     HttpMethod.GET, 
     new GraphRequest.Callback() { 
      public void onCompleted(GraphResponse response) { 
       /* handle the result */ 
      } 
     } 
    ).executeAsync(); 

================================================================ 
new GraphRequest(
       AccessToken.getCurrentAccessToken(), 
       "/744511125731315/permissions", 
       null, 
       HttpMethod.GET, 
       new GraphRequest.Callback() { 
        public void onCompleted(GraphResponse response) { 
         CommonMethod.showAlert("PERMISSION_GRANTED Fb ---> " + response, MainActivity.this); 
        } 
       } 
     ).executeAsync(); 
============================================