001/*
002 * Copyright (c) 2010-2021 Mark Allen, Norbert Bartels.
003 *
004 * Permission is hereby granted, free of charge, to any person obtaining a copy
005 * of this software and associated documentation files (the "Software"), to deal
006 * in the Software without restriction, including without limitation the rights
007 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008 * copies of the Software, and to permit persons to whom the Software is
009 * furnished to do so, subject to the following conditions:
010 *
011 * The above copyright notice and this permission notice shall be included in
012 * all copies or substantial portions of the Software.
013 *
014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
020 * THE SOFTWARE.
021 */
022package com.restfb.scope;
023
024import com.restfb.annotation.GraphAPI;
025
026/**
027 * Please check the permission dependencies
028 * <a href="https://developers.facebook.com/docs/pages/overview-1#permission-dependencies">here</a>
029 */
030public enum FacebookPermissions {
031  /**
032   * Provides access to a subset of items that are part of a person's public profile.
033   * 
034   * A person's public profile refers to the following properties on the user object by default:
035   * <ul>
036   * <li>id</li>
037   * <li>name</li>
038   * <li>first_name</li>
039   * <li>last_name</li>
040   * <li>link</li>
041   * <li>gender</li>
042   * <li>locale</li>
043   * <li>timezone</li>
044   * <li>updated_time</li>
045   * <li>verified</li>
046   * </ul>
047   * 
048   * On the web, public_profile is implied with every request and isn't required, although the best practice is to
049   * declare it. On iOS and Android, you must manually request it as part of your login flow.<br />
050   * <br />
051   * 
052   * gender &amp; locale can only be accessed if:
053   * 
054   * <ul>
055   * <li>The person queried is the person using the app.</li>
056   * <li>The person queried is using the app, and is a friend of the person using the app.</li>
057   * <li>The person queried is using the app, is not a friend of the person using the app, but the app includes either
058   * an app access token or an <code>appsecret_proof</code> argument with the call.</li> <br />
059   * <strong>Review</strong> Your app may use this permission without review from Facebook.
060   */
061  PUBLIC_PROFILE("public_profile", Category.PUBLIC), //
062
063  /**
064   * Provides access to a person's personal description (the 'About Me' section on their Profile) through the bio
065   * property on the User object.
066   *
067   * <p>
068   * This permission does not give access to a person's public profile data. A person's name, profile picture, locale,
069   * age range and gender are included by default with the public_profile permission.
070   *
071   * <p>
072   * <strong>Review</strong>
073   *
074   * <p>
075   * If your app requests this permission Facebook will have to review how your app uses it.
076   *
077   * @deprecated since breaking change on 4 April, 2018
078   */
079  @Deprecated
080  USER_ABOUT_ME("user_about_me", Category.USER_DATA), //
081
082  /**
083   * Provides access to all common books actions published by any app the person has used. This includes books they've
084   * read, want to read, rated or quoted.
085   *
086   * <p>
087   * <strong>Review</strong>
088   *
089   * <p>
090   * If your app requests this permission Facebook will have to review how your app uses it.
091   *
092   * @deprecated since breaking change on 4 April, 2018
093   */
094  @Deprecated
095  USER_ACTIONS_BOOKS("user_actions.books", Category.EVENTS_GROUPS_PAGES), //
096
097  /**
098   * Provides access to all common Open Graph fitness actions published by any app the person has used. This includes
099   * runs, walks and bikes actions.
100   *
101   * <p>
102   * <strong>Review</strong>
103   *
104   * <p>
105   * If your app requests this permission Facebook will have to review how your app uses it.
106   *
107   * @deprecated since breaking change on 4 April, 2018
108   */
109  @Deprecated
110  USER_ACTIONS_FITNESS("user_actions.fitness", Category.EVENTS_GROUPS_PAGES), //
111
112  /**
113   * Provides access to all common Open Graph music actions published by any app the person has used. This includes
114   * songs they've listened to, and playlists they've created.
115   *
116   * <p>
117   * <strong>Review</strong>
118   *
119   * <p>
120   * If your app requests this permission Facebook will have to review how your app uses it.
121   *
122   * @deprecated since breaking change on 4 April, 2018
123   */
124  @Deprecated
125  USER_ACTIONS_MUSIC("user_actions.music", Category.EVENTS_GROUPS_PAGES), //
126
127  /**
128   * Provides access to all common Open Graph news actions published by any app the person has used which publishes
129   * these actions. This includes news articles they've read or news articles they've published.
130   *
131   * <p>
132   * <strong>Review</strong>
133   *
134   * <p>
135   * If your app requests this permission Facebook will have to review how your app uses it.
136   *
137   * @deprecated since breaking change on 4 April, 2018
138   */
139  @Deprecated
140  USER_ACTIONS_NEWS("user_actions.news", Category.EVENTS_GROUPS_PAGES), //
141
142  /**
143   * Provides access to all common Open Graph video actions published by any app the person has used which publishes
144   * these actions. This includes videos they've watched, videos they've rated and videos they want to watch.
145   *
146   * <p>
147   * <strong>Review</strong>
148   *
149   * <p>
150   * If your app requests this permission Facebook will have to review how your app uses it.
151   *
152   * @deprecated since breaking change on 4 April, 2018
153   */
154  @Deprecated
155  USER_ACTIONS_VIDEO("user_actions.video", Category.EVENTS_GROUPS_PAGES), //
156
157  /**
158   * Provides access to a person's age range.
159   *
160   * <p>
161   * <strong>Review</strong>
162   *
163   * <p>
164   * If your app requests this permission Facebook will have to review how your app uses it.
165   */
166  @GraphAPI(since = "3.0")
167  USER_AGE_RANGE("user_age_range", Category.USER_DATA), //
168
169  /**
170   * Access the date and month of a person's birthday. This may or may not include the person's year of birth, dependent
171   * upon their privacy settings and the access token being used to query this field.
172   *
173   * <p>
174   * Please note most integrations will only need age_range which comes as part of the public_profile permission.
175   *
176   * <p>
177   * <strong>Review</strong>
178   *
179   * <p>
180   * If your app requests this permission Facebook will have to review how your app uses it.
181   */
182  USER_BIRTHDAY("user_birthday", Category.USER_DATA), //
183
184  /**
185   * Provides access to a person's education history through the education field on the User object.
186   *
187   * <p>
188   * <strong>Review</strong>
189   *
190   * <p>
191   * If your app requests this permission Facebook will have to review how your app uses it.
192   *
193   * @deprecated since breaking change on 4 April, 2018
194   */
195  @Deprecated
196  USER_EDUCATION_HISTORY("user_education_history", Category.USER_DATA), //
197
198  /**
199   * Provides read-only access to the Events a person is hosting or has RSVP'd to.
200   *
201   * <p>
202   * <strong>Review</strong>
203   *
204   * <p>
205   * If your app requests this permission Facebook will have to review how your app uses it.
206   */
207  USER_EVENTS("user_events", Category.EVENTS_GROUPS_PAGES), //
208
209  /**
210   * Provides access the list of friends that also use your app. These friends can be found on the friends edge on the
211   * user object.
212   *
213   * <p>
214   * In order for a person to show up in one person's friend list, both people must have decided to share their list of
215   * friends with your app and not disabled that permission during login. Also both friends must have been asked for
216   * <code>user_friends</code> during the login process.
217   *
218   * <p>
219   * <strong>Review</strong>
220   *
221   * <p>
222   * Your app may use this permission without review from Facebook.
223   */
224  USER_FRIENDS("user_friends", Category.USER_DATA), //
225
226  /**
227   * Provides access to read a person's game activity (scores, achievements) in any game the person has played.
228   *
229   * <p>
230   * <strong>Review</strong>
231   *
232   * <p>
233   * If your app requests this permission Facebook will have to review how your app uses it.
234   *
235   * @deprecated since breaking change on 4 April, 2018
236   */
237  @Deprecated
238  USER_GAMES_ACTIVITY("user_games_activity", Category.USER_DATA), //
239
240  /**
241   * Provides access to a person's gender.
242   *
243   * <p>
244   * <strong>Review</strong>
245   *
246   * <p>
247   * If your app requests this permission Facebook will have to review how your app uses it.
248   */
249  @GraphAPI(since = "3.0")
250  USER_GENDER("user_gender", Category.USER_DATA), //
251
252  /**
253   * Provides access to a person's hometown location through the hometown field on the User object. This is set by the
254   * user on the Profile.
255   *
256   * <p>
257   * <strong>Review</strong>
258   *
259   * <p>
260   * If your app requests this permission Facebook will have to review how your app uses it.
261   */
262  USER_HOMETOWN("user_hometown", Category.USER_DATA), //
263
264  /**
265   * Provides access to the list of all Facebook Pages and Open Graph objects that a person has liked. This list is
266   * available through the likes edge on the User object.
267   *
268   * <p>
269   * <strong>Review</strong>
270   *
271   * <p>
272   * If your app requests this permission Facebook will have to review how your app uses it.
273   */
274  USER_LIKES("user_likes", Category.USER_DATA), //
275
276  /**
277   * Provides access to the Facebook profile URL for another user of the app.
278   *
279   * <p>
280   * <strong>Review</strong>
281   *
282   * <p>
283   * If your app requests this permission Facebook will have to review how your app uses it.
284   */
285  @GraphAPI(since = "3.0")
286  USER_LINK("user_link", Category.USER_DATA), //
287
288  /**
289   * Provides access to a person's current city through the location field on the User object. The current city is set
290   * by a person on their Profile.
291   *
292   * <p>
293   * The current city is not necessarily the same as a person's hometown.
294   *
295   * <p>
296   * <strong>Review</strong>
297   *
298   * <p>
299   * If your app requests this permission Facebook will have to review how your app uses it.
300   */
301  USER_LOCATION("user_location", Category.USER_DATA), //
302
303  /**
304   * Enables your app to read the Groups a person is an admin of through the groups edge on the User object.
305   *
306   * <p>
307   * This permission does not allow you to create groups on behalf of a person. It is not possible to create groups via
308   * the Graph API. This does not let you read the groups a user is just a member of.
309   *
310   * <p>
311   * This permission is being deprecated as Groups is moving to a new permission model for apps. Please continue to use
312   * {@code user_managed_groups} for testing your apps in dev mode. However, when submitting for review, please select
313   * the reviewable feature Groups API, and do not submit this {@code user_managed_groups} in your review.
314   *
315   * <p>
316   * <b>Limited use: for testing only</b>
317   */
318  USER_MANAGED_GROUPS("user_managed_groups", Category.EVENTS_GROUPS_PAGES), //
319
320  /**
321   * Provides access to the photos a person has uploaded or been tagged in. This is available through the photos edge on
322   * the User object.
323   *
324   * <p>
325   * <strong>Review</strong>
326   *
327   * <p>
328   * If your app requests this permission Facebook will have to review how your app uses it.
329   */
330  USER_PHOTOS("user_photos", Category.USER_DATA), //
331
332  /**
333   * Provides access to the posts on a person's Timeline.
334   *
335   * <p>
336   * Includes their own posts, posts they are tagged in, and posts other people make on their Timeline.
337   *
338   * <p>
339   * <strong>Review</strong>
340   *
341   * <p>
342   * If your app requests this permission Facebook will have to review how your app uses it.
343   *
344   * @since 1.10.0
345   */
346  USER_POSTS("user_posts", Category.USER_DATA), //
347
348  /**
349   * Provides access to a person's relationship interests as the <code>interested_in</code> field on the User object.
350   *
351   * <p>
352   * <strong>Review</strong>
353   *
354   * <p>
355   * If your app requests this permission Facebook will have to review how your app uses it.
356   *
357   * @deprecated since breaking change on 4 April, 2018
358   */
359  @Deprecated
360  USER_RELATIONSHIP_DETAILS("user_relationship_details", Category.USER_DATA), //
361
362  /**
363   * Provides access to a person's relationship status, significant other and family members as fields on the User
364   * object.
365   *
366   * <p>
367   * <strong>Review</strong>
368   *
369   * <p>
370   * If your app requests this permission Facebook will have to review how your app uses it.
371   *
372   * @deprecated since breaking change on 4 April, 2018
373   */
374  @Deprecated
375  USER_RELATIONSHIPS("user_relationships", Category.USER_DATA), //
376
377  /**
378   * Provides access to a person's religious and political affiliations.
379   *
380   * <p>
381   * <strong>Review</strong>
382   *
383   * <p>
384   * If your app requests this permission Facebook will have to review how your app uses it.
385   *
386   * @deprecated since breaking change on 4 April, 2018
387   */
388  @Deprecated
389  USER_RELIGION_POLITICS("user_religion_politics", Category.USER_DATA), //
390
391  /**
392   * Provides access to the Places a person has been tagged at in photos, videos, statuses and links.
393   *
394   * <p>
395   * <strong>Review</strong>
396   *
397   * <p>
398   * If your app requests this permission Facebook will have to review how your app uses it.
399   */
400  USER_TAGGED_PLACES("user_tagged_places", Category.USER_DATA), //
401
402  /**
403   * Provides access to the videos a person has uploaded or been tagged in.
404   *
405   * <p>
406   * <strong>Review</strong>
407   *
408   * <p>
409   * If your app requests this permission Facebook will have to review how your app uses it.
410   */
411  USER_VIDEOS("user_videos", Category.USER_DATA), //
412
413  /**
414   * Provides access to the person's personal website URL via the website field on the User object.
415   *
416   * <p>
417   * <strong>Review</strong>
418   *
419   * <p>
420   * If your app requests this permission Facebook will have to review how your app uses it.
421   *
422   * @deprecated since breaking change on 4 April, 2018
423   */
424  @Deprecated
425  USER_WEBSITE("user_website", Category.USER_DATA), //
426
427  /**
428   * Provides access to a person's work history and list of employers via the <code>work</code> field on the User
429   * object.
430   *
431   * <p>
432   * <strong>Review</strong>
433   *
434   * <p>
435   * If your app requests this permission Facebook will have to review how your app uses it.
436   *
437   * @deprecated since breaking change on 4 April, 2018
438   */
439  @Deprecated
440  USER_WORK_HISTORY("user_work_history", Category.USER_DATA), //
441
442  /**
443   * Provides the ability to both read and manage the ads for ad accounts you have access to. Please see
444   * <a href="https://developers.facebook.com/docs/marketing-api/buying-api">Ads Management</a> for details.
445   */
446  ADS_MANAGEMENT("ads_management", Category.EVENTS_GROUPS_PAGES), //
447
448  /**
449   * Provides the access to <a href="https://developers.facebook.com/docs/marketing-api/read-access-onboarding">Ads
450   * Insights API</a> to pull ads report information for ad accounts you have access to.
451   */
452  ADS_READ("ads_read", Category.EVENTS_GROUPS_PAGES), //
453
454  /**
455   * Provides access to the person's primary email address via the email property on the user object.
456   *
457   * <p>
458   * Do not spam users. Your use of email must comply with both Facebook policies and with the CAN-SPAM Act.
459   *
460   * <p>
461   * Note, even if you request the email permission it is not guaranteed you will get an email address. For example, if
462   * someone signed up for Facebook with a phone number instead of an email address, the email field may be empty.
463   *
464   * <p>
465   * <strong>Review</strong>
466   *
467   * <p>
468   * Your app may use this permission without review from Facebook.
469   */
470  EMAIL("email", Category.USER_DATA), //
471
472  /**
473   * Enables your app to retrieve Page Access Tokens for the Pages and Apps that the person administrates.
474   *
475   * <p>
476   * <strong>Review</strong>
477   *
478   * <p>
479   * If your app requests this permission Facebook will have to review how your app uses it. You can grant this
480   * permission on behalf of people listed within the Roles section of your App's Dashboard without review by Facebook.
481   */
482  @Deprecated
483  MANAGE_PAGES("manage_pages", Category.EVENTS_GROUPS_PAGES), //
484
485  /**
486   * The {@code pages_manage_ads} permission allows your app the ability to manage ads associated with the Page.
487   * 
488   * <p>
489   * You can use this permission to create and manage ads for the Page.
490   *
491   * <p>
492   * <strong>Review</strong>
493   *
494   * <p>
495   * If your app requests this permission Facebook will have to review how your app uses it.
496   */
497  PAGES_MANAGE_ADS("pages_manage_ads", Category.EVENTS_GROUPS_PAGES), //
498
499  /**
500   * The {@code pages_manage_metadata} permission allows you to subscribe and receive webhooks about activity on the
501   * Page, and to update settings on the Page.
502   * 
503   * <p>
504   * You can use this permission if you need it to help the Page Admin administer and manage the Page.
505   *
506   * <p>
507   * <strong>Review</strong>
508   *
509   * <p>
510   * If your app requests this permission Facebook will have to review how your app uses it.
511   */
512  PAGES_MANAGE_METADATA("pages_manage_metadata", Category.EVENTS_GROUPS_PAGES), //
513
514  /**
515   * The {@code pages_read_engagement} permission allows your app the ability to read content (posts, photos, videos,
516   * events) posted by the Page, read followers data including name, PSID, and profile picture, and read metadata and
517   * other insights about the Page.
518   * 
519   * <p>
520   * You can use this permission if you need it to help the Page Admin administer and manage the Page.
521   *
522   * <p>
523   * <strong>Review</strong>
524   *
525   * <p>
526   * If your app requests this permission Facebook will have to review how your app uses it.
527   */
528  PAGES_READ_ENGAGEMENT("pages_read_engagement", Category.EVENTS_GROUPS_PAGES), //
529
530  /**
531   * The {@code pages_read_user_content} permission allows your app the ability to read User generated content on the
532   * Page, such as posts, comments, and ratings by Users or other Pages, and to delete User comments on Page posts.
533   *
534   * <p>
535   * It also allows your app to read posts that the Page is tagged in.
536   *
537   * <p>
538   * You can use this permission to read Users and other Page’s content posted on the Page if you need it to help manage
539   * the Page.
540   *
541   * <p>
542   * <strong>Review</strong>
543   *
544   * <p>
545   * If your app requests this permission Facebook will have to review how your app uses it.
546   */
547  PAGES_READ_USER_CONTENT("pages_read_user_content", Category.EVENTS_GROUPS_PAGES), //
548
549  /**
550   * Provides the access to manage call to actions of the Pages that you manage.
551   *
552   * <p>
553   * <strong>Review</strong>
554   *
555   * <p>
556   * If your app requests this permission Facebook will have to review how your app uses it.
557   */
558  @GraphAPI(since = "2.5")
559  PAGES_MANAGE_CTA("pages_manage_cta", Category.EVENTS_GROUPS_PAGES), //
560
561  /**
562   * Lets your app manage Instant Articles on behalf of Facebook Pages administered by people using your app.
563   *
564   * <p>
565   * <strong>Review</strong>
566   *
567   * <p>
568   * If your app requests this permission Facebook will have to review how your app uses it.
569   */
570  @GraphAPI(since = "2.5")
571  PAGES_MANAGE_INSTANT_ARTICLES("pages_manage_instant_articles", Category.EVENTS_GROUPS_PAGES), //
572
573  /**
574   * Provides access to manage leads retrieved from Lead Ads of the Pages that you manage.
575   *
576   * <p>
577   * <strong>Review</strong>
578   *
579   * <p>
580   * If your app requests this permission Facebook will have to review how your app uses it.
581   */
582  @GraphAPI(since = "2.3")
583  PAGES_MANAGE_LEADS("pages_manage_leads", Category.EVENTS_GROUPS_PAGES), //
584
585  /**
586   * This allows you to send and receive messages through a Facebook Page.
587   *
588   * <p>
589   * This permission cannot be used to send promotional or advertising content. Conversations through this API can only
590   * begin when someone indicates—through a Messenger plugin or directly messaging you—that they want to receive
591   * messages from you.
592   *
593   * <p>
594   * <strong>Review</strong>
595   *
596   * <p>
597   * If your app requests this permission Facebook will have to review how your app uses it.
598   */
599  @GraphAPI(since = "2.6")
600  PAGES_MESSAGING("pages_messaging", Category.MESSAGING), //
601
602  /**
603   * This allows you to send and receive messages through a Facebook Page.
604   *
605   * <p>
606   * This permission cannot be used to send promotional or advertising content. Conversations through this API can only
607   * begin when someone indicates—through a Messenger plugin or directly messaging you—that they want to receive
608   * messages from you.
609   *
610   * <p>
611   * <strong>Review</strong>
612   *
613   * <p>
614   * If your app requests this permission Facebook will have to review how your app uses it.
615   */
616  @GraphAPI(since = "2.6")
617  PAGES_MESSAGING_PHONE_NUMBER("pages_messaging_phone_number", Category.MESSAGING), //
618
619  /**
620   * Provides the access to show the list of the Pages that you manage.
621   *
622   * <p>
623   * <strong>Review</strong>
624   *
625   * <p>
626   * If your app requests this permission Facebook will have to review how your app uses it.
627   */
628  @GraphAPI(since = "2.5")
629  PAGES_SHOW_LIST("pages_show_list", Category.EVENTS_GROUPS_PAGES), //
630
631  /**
632   * Provides access to publish Posts, Open Graph actions, achievements, scores and other activity on behalf of a person
633   * using your app.
634   *
635   * <p>
636   * Because this permission lets you publish on behalf of a user please read the Platform Policies to ensure you
637   * understand how to properly use this permission.
638   *
639   * <p>
640   * Your app does not need to request the publish_actions permission in order to use the Feed Dialog, the Requests
641   * Dialog or the Send Dialog
642   *
643   * <p>
644   * <strong>Review</strong>
645   *
646   * <p>
647   * If your app requests this permission Facebook will have to review how your app uses it.
648   *
649   * @deprecated this permission is deprecated and it is not possible to publish anything to the user feed via Graph API
650   *             since April 2018
651   */
652  @Deprecated
653  PUBLISH_ACTIONS("publish_actions", Category.USER_DATA), //
654
655  /**
656   * Gives your app the ability to post, comment and like as any of the Pages managed by a person using your app.
657   *
658   * <p>
659   * Publishing as an individual personal account is not possible with this permission. To post as an individual, please
660   * see the <code>publish_actions</code> permission.
661   *
662   * <p>
663   * <strong>Review</strong>
664   *
665   * <p>
666   * If your app requests this permission Facebook will have to review how your app uses it.
667   */
668  @GraphAPI(since = "2.3")
669  @Deprecated
670  PUBLISH_PAGES("publish_pages", Category.EVENTS_GROUPS_PAGES), //
671
672  /**
673   * The {@code pages_manage_posts} permission allows your app the ability to create, edit, and delete your Page posts.
674   *
675   * <p>
676   * If you have access to {@code pages_read_user_content}, you can also use {@code pages_manage_posts} to delete Page
677   * posts created by a User.
678   *
679   * <p>
680   * You can use this permission to create and delete content on the Page.
681   *
682   * <p>
683   * <strong>Review</strong>
684   *
685   * <p>
686   * If your app requests this permission Facebook will have to review how your app uses it.
687   */
688  PAGES_MANAGE_POSTS("pages_manage_posts", Category.EVENTS_GROUPS_PAGES), //
689
690  /**
691   * The {@code pages_manage_engagement} permission allows your app the ability to create, edit, and delete comments
692   * posted on the Page.
693   *
694   * <p>
695   * If you have access to {@code pages_read_user_content}, you can also use {@code pages_manage_engagement} to delete
696   * comments posted by other Pages.
697   *
698   * <p>
699   * It also allows your app the ability to create and delete your own Page's likes to Page content.
700   *
701   * <p>
702   * You can use this permission if you need it to help manage and moderate content on the Page.
703   *
704   * <p>
705   * <strong>Review</strong>
706   *
707   * <p>
708   * If your app requests this permission Facebook will have to review how your app uses it.
709   */
710  PAGES_MANAGE_ENGAGEMENT("pages_manage_engagement", Category.EVENTS_GROUPS_PAGES), //
711
712  /**
713   * Gives an app the ability to post content into a group on behalf of a user who has granted the app this permission.
714   *
715   * <p>
716   * <strong>Review</strong>
717   *
718   * <p>
719   * If your app requests this permission Facebook will have to review how your app uses it.
720   */
721  @GraphAPI(since = "3.0")
722  PUBLISH_TO_GROUPS("publish_to_groups", Category.EVENTS_GROUPS_PAGES), //
723
724  /**
725   * Grants an app permission to publish live videos to the app User's timeline.
726   *
727   * <p>
728   * <strong>Review</strong>
729   *
730   * <p>
731   * If your app requests this permission Facebook will have to review how your app uses it.
732   */
733  @GraphAPI(since = "3.1")
734  PUBLISH_VIDEO("publish_video", Category.LIVE_VIDEO), //
735
736  /**
737   * Gives your app the ability to receive member-related data on group content when a member has granted the app
738   * permission to do so.
739   *
740   * <p>
741   * <strong>Review</strong>
742   *
743   * <p>
744   * If your app requests this permission Facebook will have to review how your app uses it.
745   */
746  @GraphAPI(since = "3.0")
747  GROUPS_ACCESS_MEMBER_INFO("groups_access_member_info", Category.EVENTS_GROUPS_PAGES), //
748
749  /**
750   * Provides read-only access to the Audience Network Insights data for Apps the person owns.
751   *
752   * <p>
753   * <strong>Review</strong>
754   *
755   * <p>
756   * If your app requests this permission Facebook will have to review how your app uses it.
757   */
758  @GraphAPI(since = "2.4")
759  READ_AUDIENCE_NETWORK_INSIGHTS("read_audience_network_insights", Category.OTHER), //
760
761  /**
762   * Provides access to the names of custom lists a person has created to organize their friends. This is useful for
763   * rendering an audience selector when someone is publishing stories to Facebook from your app.
764   *
765   * <p>
766   * This permission does not give access to a list of person's friends. If you want to access a person's friends who
767   * also use your app, you should use the user_friends permission.
768   *
769   * <p>
770   * This permission will also not help you invite a person's friends to use your app.
771   *
772   * <p>
773   * <strong>Review</strong>
774   *
775   * <p>
776   * If your app requests this permission Facebook will have to review how your app uses it.
777   *
778   * @deprecated not usable since Graph API 2.3, use <code>READ_CUSTOM_FRIENDLISTS</code> instead. If you use the Graph
779   *             API before 2.3 ignore the deprecation warning
780   */
781  @Deprecated
782  @GraphAPI(until = "2.2")
783  READ_FRIENDLISTS("read_friendlists", Category.OTHER), //
784
785  /**
786   * Provides access to the names of custom lists a person has created to organize their friends.
787   *
788   * <p>
789   * This is useful for rendering an audience selector when someone is publishing stories to Facebook from your app.
790   *
791   * <p>
792   * This permission does not give access to a list of person's friends. If you want to access a person's friends who
793   * also use your app, you should use the user_friends permission.
794   *
795   * <p>
796   * This permission will also not help you invite a person's friends to use your app.
797   *
798   * <p>
799   * This permission was called <code>read_friendlists</code> before v2.3.
800   *
801   * <p>
802   * <strong>Review</strong>
803   *
804   * <p>
805   * If your app requests this permission Facebook will have to review how your app uses it.
806   *
807   * @deprecated since breaking change on 4 April, 2018
808   */
809  @Deprecated
810  @GraphAPI(since = "2.3")
811  READ_CUSTOM_FRIENDLISTS("read_custom_friendlists", Category.OTHER), //
812
813  /**
814   * Provides read-only access to the Insights data for Pages, Apps and web domains the person owns.
815   *
816   * <p>
817   * <strong>Review</strong>
818   *
819   * <p>
820   * If your app requests this permission Facebook will have to review how your app uses it.
821   */
822  READ_INSIGHTS("read_insights", Category.OTHER), //
823
824  /**
825   * Provides the ability to read from the Page Inboxes of the Pages managed by a person. This permission is often used
826   * alongside the manage_pages permission.
827   *
828   * <p>
829   * This permission does not let your app read the page owner's mailbox. It only applies to the page's mailbox.
830   *
831   * <p>
832   * <strong>Review</strong>
833   *
834   * <p>
835   * If your app requests this permission Facebook will have to review how your app uses it.
836   */
837  READ_PAGE_MAILBOXES("read_page_mailboxes", Category.EVENTS_GROUPS_PAGES), //
838
839  /**
840   * Provides the ability to set a person's attendee status on Facebook Events (eg attending, maybe, or declined).
841   *
842   * <p>
843   * This permission does not let you invite people to an event.
844   *
845   * <p>
846   * This permission does not let you update an event's details.
847   *
848   * <p>
849   * This permission does not let you create an event. There is no way to create an event via the API as of Graph API
850   * v2.0.
851   *
852   * <p>
853   * <strong>Review</strong>
854   *
855   * <p>
856   * If your app requests this permission Facebook will have to review how your app uses it.
857   */
858  RSVP_EVENT("rsvp_event", Category.EVENTS_GROUPS_PAGES), //
859
860  /**
861   * Read and write with Business Management API
862   *
863   * <p>
864   * <strong>Review</strong>
865   *
866   * <p>
867   * If your app requests this permission Facebook will have to review how your app uses it.
868   */
869  BUSINESS_MANAGEMENT("business_management", Category.EVENTS_GROUPS_PAGES), //
870
871  /**
872   * Grants your app the ability to create, read, update, and delete business owned product catalogs that the user is an
873   * admin of. This permission grants access to related endpoints. By default, your app may only access product catalogs
874   * that are owned by admins of the app when in developer mode.
875   * 
876   * <p>
877   * <strong>Review</strong>
878   * 
879   * <p>
880   * If your app requests this permission Facebook will have to review how your app uses it.
881   */
882  CATALOG_MANAGEMENT("catalog_management", Category.EVENTS_GROUPS_PAGES), //
883
884  /**
885   * Grants your app permission to retrieve all the information captured within a
886   * <a href="https://developers.facebook.com/docs/marketing-api/guides/lead-ads/">lead.</a>
887   *
888   * <p>
889   * <strong>Review</strong>
890   *
891   * <p>
892   * If your app requests this permission Facebook will have to review how your app uses it.
893   */
894  @GraphAPI(since = "3.1")
895  LEADS_RETRIEVAL("leads_retrieval", Category.EVENTS_GROUPS_PAGES), //
896
897  /**
898   * This allows you to send and receive messages through a Facebook Page out of the 24h window opened by a user action.
899   *
900   * <p>
901   * This permission cannot be used to send promotional or advertising content.
902   *
903   * <p>
904   * <strong>Review</strong>
905   *
906   * <p>
907   * If your app requests this permission Facebook will have to review how your app uses it.
908   */
909  @GraphAPI(since = "2.6")
910  PAGES_MESSAGING_SUBSCRIPTIONS("pages_messaging_subscriptions", Category.MESSAGING), //
911
912  /**
913   * This allows you to charge users in Messenger conversations on behalf of pages.
914   *
915   * <p>
916   * Intended for tangible goods only, not virtual or subscriptions.
917   *
918   * <p>
919   * <strong>Review</strong>
920   *
921   * <p>
922   * If your app requests this permission Facebook will have to review how your app uses it.
923   */
924  @GraphAPI(since = "2.6")
925  PAGES_MESSAGING_PAYMENTS("pages_messaging_payments", Category.MESSAGING),
926
927  // Instagram Platform permissions
928
929  /**
930   * Provides the ability to read Instagram accounts you have access to.
931   *
932   * <p>
933   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
934   * Guide</a> for details.
935   *
936   * <p>
937   * <strong>Review</strong>
938   *
939   * <p>
940   * If your app requests this permission Facebook will have to review how your app uses it.
941   */
942  @GraphAPI(since = "2.5")
943  INSTAGRAM_BASIC("instagram_basic", Category.INSTAGRAM),
944
945  /**
946   * Provides the ability to read Instagram accounts you have access to.
947   *
948   * <p>
949   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
950   * Guide</a> for details.
951   *
952   * <p>
953   * <strong>Review</strong>
954   *
955   * <p>
956   * If your app requests this permission Facebook will have to review how your app uses it.
957   */
958  @GraphAPI(since = "2.5")
959  INSTAGRAM_MANAGE_COMMENTS("instagram_manage_comments", Category.INSTAGRAM),
960
961  /**
962   * Provides the ability to read insights of Instagram account you have access to.
963   *
964   * <p>
965   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
966   * Guide</a> for details.
967   *
968   * <p>
969   * <strong>Review</strong>
970   *
971   * <p>
972   * If your app requests this permission Facebook will have to review how your app uses it.
973   */
974  @GraphAPI(since = "2.5")
975  INSTAGRAM_MANAGE_INSIGHTS("instagram_manage_insights", Category.INSTAGRAM),
976
977  /**
978   * The instagram_manage_messages permission allows business users to read and respond to Instagram Direct messages.
979   * 
980   * <p>
981   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
982   * Guide</a> for details.
983   * 
984   * <p>
985   * <strong>Review</strong>
986   * 
987   * <p>
988   * If your app requests this permission Facebook will have to review how your app uses it.
989   */
990  INSTAGRAM_MANAGE_MESSAGES("instagram_manage_messages", Category.INSTAGRAM),
991
992  /**
993   * Provides the ability to publish content to Instagram account you have access to.
994   *
995   * <p>
996   * Please see <a href="https://developers.facebook.com/docs/instagram-api/reference/user/media_publish">Instagram's
997   * reference</a> for details.
998   *
999   * <p>
1000   * <strong>Review</strong>
1001   *
1002   * <p>
1003   * If your app requests this permission Facebook will have to review how your app uses it.
1004   */
1005  @GraphAPI(since = "2.5")
1006  INSTAGRAM_CONTENT_PUBLISH("instagram_content_publish", Category.INSTAGRAM),
1007
1008  /**
1009   * Provides the ability to read and/or manage WhatsApp business assets you own or have been granted access to by other
1010   * businesses through this permission.
1011   *
1012   * These business assets include WhatsApp business accounts, phone numbers, and message templates.
1013   *
1014   * <p>
1015   * Please see <a href=
1016   * "https://developers.facebook.com/docs/facebook-login/permissions/#reference-whatsapp_business_management">Whatsapps's
1017   * reference</a> for details.
1018   *
1019   * <p>
1020   * <strong>Review</strong>
1021   *
1022   * <p>
1023   * If your app requests this permission Facebook will have to review how your app uses it.
1024   */
1025  WHATSAPP_BUSINESS_MANAGEMENT("whatsapp_business_management", Category.WHATSAPP);
1026
1027  private final String permissionString;
1028
1029  private final Category category;
1030
1031  FacebookPermissions(String facebookPermissionString, Category category) {
1032    this.permissionString = facebookPermissionString;
1033    this.category = category;
1034  }
1035
1036  public String getPermissionString() {
1037    return this.permissionString;
1038  }
1039
1040  public Category getCategory() {
1041    return this.category;
1042  }
1043
1044  public enum Category {
1045    PUBLIC, USER_DATA, EVENTS_GROUPS_PAGES, OTHER, MESSAGING, INSTAGRAM, LIVE_VIDEO, WHATSAPP
1046  }
1047}