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