function fb_permissions_default_permissions in Facebook Autopost 7
Helper function to get the config array of Facebook permissions.
Parameters
string $version: The version of the Facebook Login permissions.
Return value
array The array of permissions. Giant list of checkboxes.
1 call to fb_permissions_default_permissions()
- fb_permissions_facebook_permissions_settings in fb_permissions/
fb_permissions.module - FAPI settings callback for Facebook app permissions.
File
- fb_permissions/
fb_permissions.module, line 194 - Module implementation file.
Code
function fb_permissions_default_permissions($version = 'v1') {
if ($version == 'v1.0') {
return array(
'email_permissions' => array(
'#title' => t('Email Permissions'),
'permissions' => array(
'email' => array(
'#title' => t('Email'),
'#description' => t('Provides access to the user\'s primary email address in the email property. Do not spam users. Your use of email must comply both with Facebook policies and with the CAN-SPAM Act.'),
),
),
),
'extended_permissions' => array(
'#title' => t('Extended Permissions'),
'permissions' => array(
'read_friendlists' => array(
'#title' => t("Read Friend List."),
'#description' => t("Provides access to any friend lists the user created. All user's friends are provided as part of basic data, this extended permission grants access to the lists of friends a user has created, and should only be requested if your application utilizes lists of friends."),
),
'read_insights' => array(
'#title' => t("Read Insights."),
'#description' => t("Provides read access to the Insights data for pages, applications, and domains the user owns."),
),
'read_mailbox' => array(
'#title' => t("Read Mailbox."),
'#description' => t("Provides the ability to read from a user's Facebook Inbox."),
),
'read_requests' => array(
'#title' => t("Read Requests."),
'#description' => t("Provides read access to the user's friend requests."),
),
'read_stream' => array(
'#title' => t("Read Stream."),
'#description' => t("Provides access to all the posts in the user's News Feed and enables your application to perform searches against the user's News Feed."),
),
'xmpp_login' => array(
'#title' => t("XMPP Login"),
'#description' => t("Provides applications that integrate with Facebook Chat the ability to log in users."),
),
'user_online_presence' => array(
'#title' => t("User Online Presence"),
'#description' => t("Provides access to the user's online/offline presence."),
),
'friends_online_presence' => array(
'#title' => t("Friends Online Presence"),
'#description' => t("Provides access to the user's friend's online/offline presence."),
),
'ads_management' => array(
'#title' => t("Ads Management."),
'#description' => t("Provides the ability to manage ads and call the Facebook Ads API on behalf of a user."),
),
'create_event' => array(
'#title' => t("Create Event."),
'#description' => t("Enables your application to create and modify events on the user's behalf."),
),
'manage_friendlists' => array(
'#title' => t("Manage Friendlists"),
'#description' => t("Enables your app to create and edit the user's friend lists."),
),
'manage_notifications' => array(
'#title' => t("Manage Notifications."),
'#description' => t("Enables your app to read notifications and mark them as read. Intended usage: This permission should be used to let users read and act on their notifications; it should not be used to for the purposes of modeling user behavior or data mining. Apps that misuse this permission may be banned from requesting it."),
),
'publish_actions' => array(
'#title' => t("Publish Actions."),
'#description' => t("Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. This requires extra permissions from a person using your app. However, please note that Facebook recommends a user-initiated sharing model. Please read the Platform Policies to ensure you understand how to properly use this permission. Note, you do not need to request the publish_actions permission in order to use the Feed Dialog, the Requests Dialog or the Send Dialog. Facebook used to have a permission called publish_stream, publish_actions replaces it in most cases."),
),
'rsvp_event' => array(
'#title' => t("RSVP Event."),
'#description' => t("Enables your application to RSVP to events on the user's behalf."),
),
),
),
'extended_profile_properties' => array(
'#title' => t('Extended Profile Properties'),
'permissions' => array(
'user_about_me' => array(
'#title' => t("About Me"),
'#description' => t("Provides access to the \"About Me\" section of the profile in the about property."),
),
'user_activities' => array(
'#title' => t("Activities."),
'#description' => t("Provides access to the user's list of activities as the activities connection"),
),
'user_birthday' => array(
'#title' => t("Birthday."),
'#description' => t("Provides access to the birthday with year as the birthday property. Note that your app may determine if a user is \"old enough\" to use an app by obtaining the age_range public profile property"),
),
'user_checkins' => array(
'#title' => t("Check-ins."),
'#description' => t("Provides read access to the authorized user's check-ins or a friend's check-ins that the user can see. This permission is superseded by user_status for new applications as of March, 2012."),
),
'user_education_history' => array(
'#title' => t("Education History."),
'#description' => t("Provides access to education history as the education property"),
),
'user_events' => array(
'#title' => t("Events."),
'#description' => t("Provides access to the list of events the user is attending as the events connection"),
),
'user_groups' => array(
'#title' => t("Groups."),
'#description' => t("Provides access to the list of groups the user is a member of as the groups connection"),
),
'user_hometown' => array(
'#title' => t("Hometown."),
'#description' => t("Provides access to the user's hometown in the hometown property"),
),
'user_interests' => array(
'#title' => t("Interests."),
'#description' => t("Provides access to the user's list of interests as the interests connection"),
),
'user_likes' => array(
'#title' => t("Likes."),
'#description' => t("Provides access to the list of all of the pages the user has liked as the likes connection"),
),
'user_location' => array(
'#title' => t("Location."),
'#description' => t("Provides access to the user's current city as the location property"),
),
'user_notes' => array(
'#title' => t("Notes."),
'#description' => t("Provides access to the user's notes as the notes connection"),
),
'user_questions' => array(
'#title' => t("Questions."),
'#description' => t("Provides access to the photos the user has uploaded, and photos the user has been tagged in"),
),
'user_relationships' => array(
'#title' => t("Relationships."),
'#description' => t("Provides access to the questions the user or friend has asked"),
),
'user_relationship_details' => array(
'#title' => t("Relationship Details."),
'#description' => t("Provides access to the user's family and personal relationships and relationship status"),
),
'user_religion_politics' => array(
'#title' => t("Religion Politics."),
'#description' => t("Provides access to the user's religious and political affiliations"),
),
'user_status' => array(
'#title' => t("Status."),
'#description' => t("Provides access to the user's status messages and checkins. Please see the documentation for the location_post table for information on how this permission may affect retrieval of information about the locations associated with posts."),
),
'user_subscriptions' => array(
'#title' => t("Subscriptions."),
'#description' => t("Provides access to the user's subscribers and subscribees"),
),
'user_videos' => array(
'#title' => t("Videos."),
'#description' => t("Provides access to the videos the user has uploaded, and videos the user has been tagged in"),
),
'user_website' => array(
'#title' => t("Website."),
'#description' => t("Provides access to the user's web site URL"),
),
'user_work_history' => array(
'#title' => t("Work history."),
'#description' => t("Provides access to work history as the work property"),
),
'friends_about_me' => array(
'#title' => t("(Friend's) About Me"),
'#description' => t("Provides access to the \"About Me\" section of the profile in the about property."),
),
'friends_activities' => array(
'#title' => t("(Friend's) Activities."),
'#description' => t("Provides access to the user's list of activities as the activities connection"),
),
'friends_birthday' => array(
'#title' => t("(Friend's) Birthday."),
'#description' => t("Provides access to the birthday with year as the birthday property. Note that your app may determine if a user is \"old enough\" to use an app by obtaining the age_range public profile property"),
),
'friends_checkins' => array(
'#title' => t("(Friend's) Check-ins."),
'#description' => t("Provides read access to the authorized user's check-ins or a friend's check-ins that the user can see. This permission is superseded by friends_status for new applications as of March, 2012."),
),
'friends_education_history' => array(
'#title' => t("(Friend's) Education History."),
'#description' => t("Provides access to education history as the education property"),
),
'friends_events' => array(
'#title' => t("(Friend's) Events."),
'#description' => t("Provides access to the list of events the user is attending as the events connection"),
),
'friends_groups' => array(
'#title' => t("(Friend's) Groups."),
'#description' => t("Provides access to the list of groups the user is a member of as the groups connection"),
),
'friends_hometown' => array(
'#title' => t("(Friend's) Hometown."),
'#description' => t("Provides access to the user's hometown in the hometown property"),
),
'friends_interests' => array(
'#title' => t("(Friend's) Interests."),
'#description' => t("Provides access to the user's list of interests as the interests connection"),
),
'friends_likes' => array(
'#title' => t("(Friend's) Likes."),
'#description' => t("Provides access to the list of all of the pages the user has liked as the likes connection"),
),
'friends_location' => array(
'#title' => t("(Friend's) Location."),
'#description' => t("Provides access to the user's current city as the location property"),
),
'friends_notes' => array(
'#title' => t("(Friend's) Notes."),
'#description' => t("Provides access to the user's notes as the notes connection"),
),
'friends_questions' => array(
'#title' => t("(Friend's) Questions."),
'#description' => t("Provides access to the photos the user has uploaded, and photos the user has been tagged in"),
),
'friends_relationships' => array(
'#title' => t("(Friend's) Relationships."),
'#description' => t("Provides access to the questions the user or friend has asked"),
),
'friends_relationship_details' => array(
'#title' => t("(Friend's) Relationship Details."),
'#description' => t("Provides access to the user's family and personal relationships and relationship status"),
),
'friends_religion_politics' => array(
'#title' => t("(Friend's) Religion Politics."),
'#description' => t("Provides access to the user's religious and political affiliations"),
),
'friends_status' => array(
'#title' => t("(Friend's) Status."),
'#description' => t("Provides access to the user's status messages and checkins. Please see the documentation for the location_post table for information on how this permission may affect retrieval of information about the locations associated with posts."),
),
'friends_subscriptions' => array(
'#title' => t("(Friend's) Subscriptions."),
'#description' => t("Provides access to the user's subscribers and subscribees"),
),
'friends_videos' => array(
'#title' => t("(Friend's) Videos."),
'#description' => t("Provides access to the videos the user has uploaded, and videos the user has been tagged in"),
),
'friends_website' => array(
'#title' => t("(Friend's) Website."),
'#description' => t("Provides access to the user's web site URL"),
),
'friends_work_history' => array(
'#title' => t("(Friend's) Work history."),
'#description' => t("Provides access to work history as the work property"),
),
),
),
'page_permissions' => array(
'#title' => t("Page Permissions"),
'permissions' => array(
'manage_pages' => array(
'#title' => t("Manage Pages."),
'#description' => t("Enables your application to retrieve access_tokens for Pages and Applications that the user administrates. The access tokens can be queried by calling /<user_id>/accounts via the Graph API. See here for generating long-lived Page access tokens that do not expire after 60 days."),
),
),
),
'open_graph_permissions' => array(
'#title' => t("Open Graph Permissions"),
'permissions' => array(
'publish_actions' => array(
'#title' => t("Publish Actions."),
'#description' => t("Allows your app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. Your app can also publish other activity which is detailed in the Publishing Permissions doc."),
),
'user_actions.music' => array(
'#title' => t("Actions: Music."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in music.listens action."),
),
'user_actions|news' => array(
'#title' => t("Actions: News."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in news.reads action."),
),
'user_actions|video' => array(
'#title' => t("Actions: Video."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in video.watches action."),
),
'user_games_activity' => array(
'#title' => t("Games activity."),
'#description' => t("Allows you post and retrieve game achievement activity."),
),
'friends_actions|music' => array(
'#title' => t("(Friend's) Actions: Music."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in music.listens action."),
),
'friends_actions|news' => array(
'#title' => t("(Friend's) Actions: News."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in news.reads action."),
),
'friends_actions|video' => array(
'#title' => t("(Friend's) Actions: Video."),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in video.watches action."),
),
'friends_games_activity' => array(
'#title' => t("(Friend's) Games activity."),
'#description' => t("Allows you post and retrieve game achievement activity."),
),
),
),
);
}
if ($version == 'v2.0') {
return array(
'public_profile' => array(
'#title' => t('Public Profile'),
'permissions' => array(
'public_profile' => array(
'#title' => t('Public Profile.'),
'#description' => t("Gives access to a subset of a person's public profile. Required when requesting permissions on iOS and Android."),
),
),
),
'friends' => array(
'#title' => t('Friends'),
'permissions' => array(
'user_friends' => array(
'#title' => t('Friends.'),
'#description' => t("This permission grants the app permission to read a list of this person's friends who also use your app. If any of this person's friends have chosen not to share their list of friends with your app, they will not show up in the list of friends for this person. Both people must have enable the user_friends permission enabled for a friend to show up in either friend list."),
),
),
),
'email_permissions' => array(
'#title' => t('Email Permissions'),
'permissions' => array(
'email' => array(
'#title' => t('Email.'),
'#description' => t("Provides access to the user's primary email address in the email property. Do not spam users. Your use of email must comply both with Facebook policies and with the CAN-SPAM Act."),
),
),
),
'extended_profile_properties' => array(
'#title' => t('Extended Profile Properties'),
'permissions' => array(
'user_about_me' => array(
'#title' => t('About Me.'),
'#description' => t("This permission only provides access to the about property on the user node, which is the value that's contained in the 'About Me' field in their Facebook profile. This permission is not needed to access the person's public profile information such as their name, gender or age range. Use the public_profile permission for those values."),
),
'user_activities' => array(
'#title' => t('Activities.'),
'#description' => t("Provides access to the user's list of activities as the activities connection"),
),
'user_birthday' => array(
'#title' => t('Birthday.'),
'#description' => t("Provides access to the birthday with year as the birthday property. Note that your app may determine if a user is 'old enough' to use an app by obtaining the age_range public profile property"),
),
'user_education_history' => array(
'#title' => t('Education History.'),
'#description' => t("Provides access to education history as the education property"),
),
'user_events' => array(
'#title' => t('Events'),
'#description' => t("Provides access to the list of events the user is attending as the events connection"),
),
'user_groups' => array(
'#title' => t('Groups.'),
'#description' => t("Provides access to the list of groups the user is a member of as the groups connection. This permission is reserved for apps that replicate the Facebook client on platforms that don’t have a native client. It may only be used to provide people with access to this content. It make take up to 14 days for your app to be reviewed."),
),
'user_hometown' => array(
'#title' => t('Hometown.'),
'#description' => t("Provides access to the user's hometown in the hometown property"),
),
'user_interests' => array(
'#title' => t('Interests.'),
'#description' => t("Provides access to the user's list of interests as the interests connection"),
),
'user_likes' => array(
'#title' => t('Likes.'),
'#description' => t("Provides access to the list of all of the pages the user has liked as the likes connection"),
),
'user_location' => array(
'#title' => t('Location.'),
'#description' => t("Provides access to the user's current city as the location property"),
),
'user_photos' => array(
'#title' => t('Photos.'),
'#description' => t("Provides access to the photos the user has uploaded, and photos the user has been tagged in"),
),
'user_relationships' => array(
'#title' => t('Relationships.'),
'#description' => t("Provides access to the user's family and personal relationships and relationship status"),
),
'user_relationship_details' => array(
'#title' => t('Relationship Details.'),
'#description' => t("Provides access to the user's relationship preferences"),
),
'user_religion_politics' => array(
'#title' => t('Religion & Politics.'),
'#description' => t("Provides access to the user's religious and political affiliations"),
),
'user_status' => array(
'#title' => t('Status'),
'#description' => t("Provides access to the user's status messages and checkins. Please see the documentation for the location_post table for information on how this permission may affect retrieval of information about the locations associated with posts."),
),
'user_tagged_places' => array(
'#title' => t('Tagged Places.'),
'#description' => t("Provides access to posts, photos and checkins that the person has been tagged in."),
),
'user_videos' => array(
'#title' => t('Videos.'),
'#description' => t("Provides access to the videos the user has uploaded, and videos the user has been tagged in"),
),
'user_website' => array(
'#title' => t('Website'),
'#description' => t("Provides access to the user's web site URL"),
),
'user_work_history' => array(
'#title' => t('Work History.'),
'#description' => t("Provides access to work history as the work property"),
),
),
),
'extended_permissions' => array(
'#title' => t('Extended Permissions'),
'permissions' => array(
'read_friendlists' => array(
'#title' => t('Read Friendlists.'),
'#description' => t("Provides access to the names of the custom lists a person has created to manage their friends. This is useful for creating a custom audience selection tool when sharing content. Note: to access the person's friends you should request the user_friends permission, not this permission."),
),
'read_insights' => array(
'#title' => t('Read Insights.'),
'#description' => t("Provides read access to Facebook Insights data for pages, applications, and domains the user owns."),
),
'read_mailbox' => array(
'#title' => t('Read Mailbox.'),
'#description' => t("Provides the ability to read from a user's Facebook Inbox. This permission is reserved for apps that replicate the Facebook client on platforms that don’t have a native client. It may only be used to provide people with access to this content. It may take up to 14 days for your app to be reviewed."),
),
'read_stream' => array(
'#title' => t('Read Stream.'),
'#description' => t("Provides access to all the posts in the person's news feed. This permission is reserved for apps that replicate the Facebook client on platforms that don’t have a native client. It may only be used to provide people with access to this content. It may take up to 14 days for your app to be reviewed."),
),
),
),
'extended_permissions_publish' => array(
'#title' => t('Extended Permissions - Publish'),
'permissions' => array(
'manage_notifications' => array(
'#title' => t('Manage Notifications.'),
'#description' => t("Enables your app to read notifications and mark them as read. Intended usage: This permission should be used to let users read and act on their notifications; it should not be used to for the purposes of modeling user behavior or data mining. Apps that misuse this permission may be banned from requesting it. This permissions is reserved for apps that replicate the Facebook client on platforms that don’t have a native client. It may only be used to provide people with access to this content. It may take up 14 days for your app to be reviewed."),
),
'publish_actions' => array(
'#title' => t('Publish Actions.'),
'#description' => t("Enables your app to post content, comments and likes to a user's stream and requires extra permissions from a person using your app. Because this permission lets you publish on behalf of a user please read the Platform Policies to ensure you understand how to properly use this permission. Note, you do not need to request the publish_actions permission in order to use the Feed Dialog, the Requests Dialog or the Send Dialog. Facebook used to have a permission called publish_stream. publish_actions replaces it in all cases. This permission also replaces photo_upload."),
),
'rsvp_event' => array(
'#title' => t('RSVP Event.'),
'#description' => t("Enables your application to RSVP to events on the user's behalf"),
),
),
),
'open_graph_permissions' => array(
'#title' => t('Open Graph Permissions'),
'permissions' => array(
'publish_actions' => array(
'#title' => t('Publish Actions.'),
'#description' => t("Allows your app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. Your app can also publish other activity which is detailed in the Publishing Permissions doc."),
),
'user_actions.books' => array(
'#title' => t('User Actions: Books.'),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in books actions."),
),
'user_actions.fitness' => array(
'#title' => t('User Actions: Fitness.'),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in fitness actions."),
),
'user_actions.music' => array(
'#title' => t('User Actions: Music.'),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in music actions."),
),
'user_actions.news' => array(
'#title' => t('User Actions: News.'),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in news.reads action."),
),
'user_actions.video' => array(
'#title' => t('User Actions: Video.'),
'#description' => t("Allows you to retrieve the actions published by all applications using the built-in video.watches action."),
),
'user_actions:APP_NAMESPACE' => array(
'#title' => t('User Actions: APP_NAMESPACE.'),
'#description' => t("Allows you to retrieve the actions published by another application as specified by the app namespace. For example, to request the ability to retrieve the actions published by an app which has the namespace awesomeapp, prompt the user for the user_actions: awesomeapp permission."),
),
),
),
'pages' => array(
'#title' => t('Pages'),
'permissions' => array(
'manage_pages' => array(
'#title' => t('Manage Pages.'),
'#description' => t("Enables your application to retrieve access_tokens for Pages and Applications that the user administrates. The access tokens can be queried by calling /{user_id}/accounts via the Graph API. See here for generating long-lived Page access tokens that do not expire after 60 days."),
),
'publish_pages' => array(
'#title' => t('Publish Pages.'),
'#description' => t("This permission is required to publish as a Page as of API version 2.3. Previously publish_actions was required."),
),
'read_page_mailboxes' => array(
'#title' => t('Read Page Mailboxes.'),
'#description' => t("Enables your application to retrieve the Facebook Messages conversations for Pages. You must use a Page Access Token to do this. Conversations are retrieved by calling /{page_id}/conversations via the Graph API."),
),
),
),
);
}
}