facebook4j.api
Interface PermissionMethods

All Known Subinterfaces:
Facebook
All Known Implementing Classes:
FacebookImpl

public interface PermissionMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 java.util.List<Permission> getPermissions()
          Returns the permissions granted the current user to the current application.
 java.util.List<Permission> getPermissions(java.lang.String userId)
          Returns the permissions granted a user to the current application.
 boolean revokePermission(java.lang.String permissionName)
          Revokes a specific permission from the current application.
 boolean revokePermission(java.lang.String userId, java.lang.String permissionName)
          Revokes a specific permission from the current application.
 

Method Detail

getPermissions

java.util.List<Permission> getPermissions()
                                          throws FacebookException
Returns the permissions granted the current user to the current application.

Returns:
permission names
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#permissions - Facebook Developers

getPermissions

java.util.List<Permission> getPermissions(java.lang.String userId)
                                          throws FacebookException
Returns the permissions granted a user to the current application.

Parameters:
userId - the ID of a user
Returns:
permission names
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#permissions - Facebook Developers

revokePermission

boolean revokePermission(java.lang.String permissionName)
                         throws FacebookException
Revokes a specific permission from the current application.

Parameters:
permissionName - permission name
Returns:
true if revoke is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#permissions - Facebook Developers

revokePermission

boolean revokePermission(java.lang.String userId,
                         java.lang.String permissionName)
                         throws FacebookException
Revokes a specific permission from the current application.

Parameters:
userId - the ID of a user
permissionName - permission name
Returns:
true if revoke is succressful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#permissions - Facebook Developers