|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Permission>
com.google.code.facebookapi.Permission
public enum Permission
Enum for managing the different permission-types used by Facebook. These are opt-in permissions that the user must explicitly grant, and can only be requested one at a time. To request that a user grant you a permission, direct them to a URL of the form: http://www.facebook.com/authorize.php?api_key=[YOUR_API_KEY]&v=1.0&ext_perm=[PERMISSION NAME] You can query to see if the user has granted your application a given permission using the 'users.hasAppPermission' API call.
| Enum Constant Summary | |
|---|---|
CREATE_EVENT
This permission allows an app to create and modify events for a user via the events.create, events.edit and events.cancel methods. |
|
CREATE_NOTE
This permission allows an application to provide the mechanism for a user to write, edit, and delete notes on their profile. |
|
EMAIL
This permission allows an application to send email to its user. |
|
OFFLINE_ACCESS
This permission grants an application access to user data when the user is offline or doesn't have an active session. |
|
PHOTO_UPLOAD
This permission relaxes requirements on the photos.upload and photos.addTag methods. |
|
PUBLISH_STREAM
Lets your application or site post content, comments, and likes to a user's profile and in the streams of the user's friends without prompting the user. |
|
READ_MAILBOX
This permission grants an application the ability to read from a user's Facebook Inbox. |
|
READ_STREAM
Lets your application or site access a user's stream and display it. |
|
RSVP_EVENT
This permission allows an app to RSVP to an event on behalf of a user via the events.rsvp method. |
|
SHARE_ITEM
This permission allows an application to provide the mechanism for a user to post links to their profile. |
|
SMS
This permissions allows a mobile application to send messages to the user and respond to messages from the user via text message. |
|
SMS_SEND
This permissions allows a mobile application to send messages to the user and respond to messages from the user via text message. |
|
STATUS_UPDATE
This permission grants your application the ability to update a user's or Facebook Page's status with the status.set or users.setStatus method. |
|
VIDEO_UPLOAD
This permission allows an application to provide the mechanism for a user to upload videos to their profile. |
|
| Field Summary | |
|---|---|
static java.lang.String |
PERM_AUTHORIZE_ADDR
The unchanging part of the URL to use when authorizing permissions. |
| Method Summary | |
|---|---|
static java.lang.String |
authorizationUrl(java.lang.String apiKey,
Permission permission)
Compute the URL to which to send the user to request the extended permission. |
java.lang.String |
getName()
Gets the name by which Facebook refers to this permission. |
static Permission |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Permission[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Permission PUBLISH_STREAM
public static final Permission READ_STREAM
public static final Permission EMAIL
public static final Permission READ_MAILBOX
public static final Permission OFFLINE_ACCESS
public static final Permission CREATE_EVENT
public static final Permission RSVP_EVENT
public static final Permission SMS
public static final Permission SMS_SEND
public static final Permission STATUS_UPDATE
public static final Permission PHOTO_UPLOAD
public static final Permission VIDEO_UPLOAD
public static final Permission CREATE_NOTE
public static final Permission SHARE_ITEM
| Field Detail |
|---|
public static final java.lang.String PERM_AUTHORIZE_ADDR
| Method Detail |
|---|
public static Permission[] values()
for (Permission c : Permission.values()) System.out.println(c);
public static Permission valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic java.lang.String getName()
public static java.lang.String authorizationUrl(java.lang.String apiKey,
Permission permission)
apiKey - your application's API key.permission - the permission you want the grant URL for.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||