001/*
002 * Copyright (c) 2010-2024 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   * <p>
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 age range.
065   *
066   * <p>
067   * <strong>Review</strong>
068   *
069   * <p>
070   * If your app requests this permission Facebook will have to review how your app uses it.
071   */
072  @GraphAPI(since = "3.0")
073  USER_AGE_RANGE("user_age_range", Category.USER_DATA), //
074
075  /**
076   * Access the date and month of a person's birthday. This may or may not include the person's year of birth, dependent
077   * upon their privacy settings and the access token being used to query this field.
078   *
079   * <p>
080   * Please note most integrations will only need age_range which comes as part of the public_profile permission.
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  USER_BIRTHDAY("user_birthday", Category.USER_DATA), //
089
090  /**
091   * Provides read-only access to the Events a person is hosting or has RSVP'd to.
092   *
093   * <p>
094   * <strong>Review</strong>
095   *
096   * <p>
097   * If your app requests this permission Facebook will have to review how your app uses it.
098   */
099  USER_EVENTS("user_events", Category.EVENTS_GROUPS_PAGES), //
100
101  /**
102   * Provides access the list of friends that also use your app. These friends can be found on the friends edge on the
103   * user object.
104   *
105   * <p>
106   * In order for a person to show up in one person's friend list, both people must have decided to share their list of
107   * friends with your app and not disabled that permission during login. Also both friends must have been asked for
108   * <code>user_friends</code> during the login process.
109   *
110   * <p>
111   * <strong>Review</strong>
112   *
113   * <p>
114   * Your app may use this permission without review from Facebook.
115   */
116  USER_FRIENDS("user_friends", Category.USER_DATA), //
117
118  /**
119   * Provides access to a person's gender.
120   *
121   * <p>
122   * <strong>Review</strong>
123   *
124   * <p>
125   * If your app requests this permission Facebook will have to review how your app uses it.
126   */
127  @GraphAPI(since = "3.0")
128  USER_GENDER("user_gender", Category.USER_DATA), //
129
130  /**
131   * Provides access to a person's hometown location through the hometown field on the User object. This is set by the
132   * user on the Profile.
133   *
134   * <p>
135   * <strong>Review</strong>
136   *
137   * <p>
138   * If your app requests this permission Facebook will have to review how your app uses it.
139   */
140  USER_HOMETOWN("user_hometown", Category.USER_DATA), //
141
142  /**
143   * Provides access to the list of all Facebook Pages and Open Graph objects that a person has liked. This list is
144   * available through the likes edge on the User object.
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  USER_LIKES("user_likes", Category.USER_DATA), //
153
154  /**
155   * Provides access to the Facebook profile URL for another user of the app.
156   *
157   * <p>
158   * <strong>Review</strong>
159   *
160   * <p>
161   * If your app requests this permission Facebook will have to review how your app uses it.
162   */
163  @GraphAPI(since = "3.0")
164  USER_LINK("user_link", Category.USER_DATA), //
165
166  /**
167   * Provides access to a person's current city through the location field on the User object. The current city is set
168   * by a person on their Profile.
169   *
170   * <p>
171   * The current city is not necessarily the same as a person's hometown.
172   *
173   * <p>
174   * <strong>Review</strong>
175   *
176   * <p>
177   * If your app requests this permission Facebook will have to review how your app uses it.
178   */
179  USER_LOCATION("user_location", Category.USER_DATA), //
180
181  /**
182   * Enables your app to read the Groups a person is an admin of through the groups edge on the User object.
183   *
184   * <p>
185   * This permission does not allow you to create groups on behalf of a person. It is not possible to create groups via
186   * the Graph API. This does not let you read the groups a user is just a member of.
187   *
188   * <p>
189   * This permission is being deprecated as Groups is moving to a new permission model for apps. Please continue to use
190   * {@code user_managed_groups} for testing your apps in dev mode. However, when submitting for review, please select
191   * the reviewable feature Groups API, and do not submit this {@code user_managed_groups} in your review.
192   *
193   * <p>
194   * <b>Limited use: for testing only</strong>
195   */
196  USER_MANAGED_GROUPS("user_managed_groups", Category.EVENTS_GROUPS_PAGES), //
197
198  /**
199   * The user_messenger_contact permission allows a business to contact a person via Messenger upon their approval or
200   * initiation of a chat thread with the business's Page.
201   *
202   * <p>
203   * The allowed usage for this permission is for a Page to send a person an initial message, post—purchase updates and
204   * account updates.
205   * <p>
206   * <strong>Review</strong>
207   *
208   * <p>
209   * If your app requests this permission Facebook will have to review how your app uses it.
210   */
211  USER_MESSENGER_CONTACT("user_messenger_contact", Category.EVENTS_GROUPS_PAGES), //
212
213  /**
214   * Provides access to the photos a person has uploaded or been tagged in. This is available through the photos edge on
215   * the User object.
216   *
217   * <p>
218   * <strong>Review</strong>
219   *
220   * <p>
221   * If your app requests this permission Facebook will have to review how your app uses it.
222   */
223  USER_PHOTOS("user_photos", Category.USER_DATA), //
224
225  /**
226   * Provides access to the posts on a person's Timeline.
227   *
228   * <p>
229   * Includes their own posts, posts they are tagged in, and posts other people make on their Timeline.
230   *
231   * <p>
232   * <strong>Review</strong>
233   *
234   * <p>
235   * If your app requests this permission Facebook will have to review how your app uses it.
236   *
237   * @since 1.10.0
238   */
239  USER_POSTS("user_posts", Category.USER_DATA), //
240
241  /**
242   * Provides access to the Places a person has been tagged at in photos, videos, statuses and links.
243   *
244   * <p>
245   * <strong>Review</strong>
246   *
247   * <p>
248   * If your app requests this permission Facebook will have to review how your app uses it.
249   */
250  USER_TAGGED_PLACES("user_tagged_places", Category.USER_DATA), //
251
252  /**
253   * Provides access to the videos a person has uploaded or been tagged in.
254   *
255   * <p>
256   * <strong>Review</strong>
257   *
258   * <p>
259   * If your app requests this permission Facebook will have to review how your app uses it.
260   */
261  USER_VIDEOS("user_videos", Category.USER_DATA), //
262
263  /**
264   * Provides the ability to both read and manage the ads for ad accounts you have access to. Please see
265   * <a href="https://developers.facebook.com/docs/marketing-api/buying-api">Ads Management</a> for details.
266   */
267  ADS_MANAGEMENT("ads_management", Category.EVENTS_GROUPS_PAGES), //
268
269  /**
270   * Provides the access to <a href="https://developers.facebook.com/docs/marketing-api/read-access-onboarding">Ads
271   * Insights API</a> to pull ads report information for ad accounts you have access to.
272   */
273  ADS_READ("ads_read", Category.EVENTS_GROUPS_PAGES), //
274
275  /**
276   * The attribution_read permission grants your app access to the Attribution API to pull attribution report data for
277   * lines of business you own or have been granted access to by the owner or owners of other lines of business.
278   * <p>
279   * Allowed Usage
280   * <p>
281   * Provides the ability for your app to access ads performance data from Attribution for use in custom dashboards and
282   * data analytics.
283   */
284  ATTRIBUTION_READ("attribution_read", Category.EVENTS_GROUPS_PAGES), //
285
286  /**
287   * Provides access to the person's primary email address via the email property on the user object.
288   *
289   * <p>
290   * Do not spam users. Your use of email must comply with both Facebook policies and with the CAN-SPAM Act.
291   *
292   * <p>
293   * Note, even if you request the email permission it is not guaranteed you will get an email address. For example, if
294   * someone signed up for Facebook with a phone number instead of an email address, the email field may be empty.
295   *
296   * <p>
297   * <strong>Review</strong>
298   *
299   * <p>
300   * Your app may use this permission without review from Facebook.
301   */
302  EMAIL("email", Category.USER_DATA), //
303
304  /**
305   * The page_events permissions allows your app permission to log events on behalf of Facebook Pages administered by
306   * people using your app and to send those events to Facebook for ads targeting, optimization and reporting.
307   * <p>
308   * <strong>Allowed Usage</strong>
309   * <p>
310   * Send businesses related activities (for example purchase, add-to-cart, lead) on behalf of Pages owned by the people
311   * who use your app.
312   */
313  PAGES_EVENTS("pages_events", Category.EVENTS_GROUPS_PAGES), //
314
315  /**
316   * The {@code pages_manage_ads} permission allows your app the ability to manage ads associated with the Page.
317   * 
318   * <p>
319   * You can use this permission to create and manage ads for the Page.
320   *
321   * <p>
322   * <strong>Review</strong>
323   *
324   * <p>
325   * If your app requests this permission Facebook will have to review how your app uses it.
326   *
327   * @since June 1, 2020
328   */
329  PAGES_MANAGE_ADS("pages_manage_ads", Category.EVENTS_GROUPS_PAGES), //
330
331  /**
332   * The {@code pages_manage_metadata} permission allows you to subscribe and receive webhooks about activity on the
333   * Page, and to update settings on the Page.
334   * 
335   * <p>
336   * You can use this permission if you need it to help the Page Admin administer and manage the Page.
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 June 1, 2020
345   */
346  PAGES_MANAGE_METADATA("pages_manage_metadata", Category.EVENTS_GROUPS_PAGES), //
347
348  /**
349   * The {@code pages_read_engagement} permission allows your app the ability to read content (posts, photos, videos,
350   * events) posted by the Page, read followers data including name, PSID, and profile picture, and read metadata and
351   * other insights about the Page.
352   * 
353   * <p>
354   * You can use this permission if you need it to help the Page Admin administer and manage the Page.
355   *
356   * <p>
357   * <strong>Review</strong>
358   *
359   * <p>
360   * If your app requests this permission Facebook will have to review how your app uses it.
361   *
362   * @since June 1, 2020
363   */
364  PAGES_READ_ENGAGEMENT("pages_read_engagement", Category.EVENTS_GROUPS_PAGES), //
365
366  /**
367   * The {@code pages_read_user_content} permission allows your app the ability to read User generated content on the
368   * Page, such as posts, comments, and ratings by Users or other Pages, and to delete User comments on Page posts.
369   *
370   * <p>
371   * It also allows your app to read posts that the Page is tagged in.
372   *
373   * <p>
374   * You can use this permission to read Users and other Page’s content posted on the Page if you need it to help manage
375   * the Page.
376   *
377   * <p>
378   * <strong>Review</strong>
379   *
380   * <p>
381   * If your app requests this permission Facebook will have to review how your app uses it.
382   *
383   * @since June 1, 2020
384   */
385  PAGES_READ_USER_CONTENT("pages_read_user_content", Category.EVENTS_GROUPS_PAGES), //
386
387  /**
388   * Provides the access to manage call to actions of the Pages that you manage.
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  @GraphAPI(since = "2.5")
397  PAGES_MANAGE_CTA("pages_manage_cta", Category.EVENTS_GROUPS_PAGES), //
398
399  /**
400   * Lets your app manage Instant Articles on behalf of Facebook Pages administered by people using your app.
401   *
402   * <p>
403   * <strong>Review</strong>
404   *
405   * <p>
406   * If your app requests this permission Facebook will have to review how your app uses it.
407   */
408  @GraphAPI(since = "2.5")
409  PAGES_MANAGE_INSTANT_ARTICLES("pages_manage_instant_articles", Category.EVENTS_GROUPS_PAGES), //
410
411  /**
412   * Provides access to manage leads retrieved from Lead Ads of the Pages that you manage.
413   *
414   * <p>
415   * <strong>Review</strong>
416   *
417   * <p>
418   * If your app requests this permission Facebook will have to review how your app uses it.
419   */
420  @GraphAPI(since = "2.3")
421  PAGES_MANAGE_LEADS("pages_manage_leads", Category.EVENTS_GROUPS_PAGES), //
422
423  /**
424   * This allows you to send and receive messages through a Facebook Page.
425   *
426   * <p>
427   * This permission cannot be used to send promotional or advertising content. Conversations through this API can only
428   * begin when someone indicates—through a Messenger plugin or directly messaging you—that they want to receive
429   * messages from you.
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  @GraphAPI(since = "2.6")
438  PAGES_MESSAGING("pages_messaging", Category.MESSAGING), //
439
440  /**
441   * This allows you to send and receive messages through a Facebook Page.
442   *
443   * <p>
444   * This permission cannot be used to send promotional or advertising content. Conversations through this API can only
445   * begin when someone indicates—through a Messenger plugin or directly messaging you—that they want to receive
446   * messages from you.
447   *
448   * <p>
449   * <strong>Review</strong>
450   *
451   * <p>
452   * If your app requests this permission Facebook will have to review how your app uses it.
453   */
454  @GraphAPI(since = "2.6")
455  PAGES_MESSAGING_PHONE_NUMBER("pages_messaging_phone_number", Category.MESSAGING), //
456
457  /**
458   * Provides the access to show the list of the Pages that you manage.
459   *
460   * <p>
461   * <strong>Review</strong>
462   *
463   * <p>
464   * If your app requests this permission Facebook will have to review how your app uses it.
465   */
466  @GraphAPI(since = "2.5")
467  PAGES_SHOW_LIST("pages_show_list", Category.EVENTS_GROUPS_PAGES), //
468
469  /**
470   * The pages_user_gender permission allows your app to access a user's gender through the Page your app is connected
471   * to.
472   * <p>
473   * Allowed Usage
474   *
475   * <ul>
476   * <li>Personalize experiences or recommendations based on gender.</li>
477   * <li>Use gendered language such as correct pronouns and titles.</li>
478   * </ul>
479   */
480  PAGES_USER_GENDER("pages_user_gender", Category.EVENTS_GROUPS_PAGES), //
481
482  /**
483   * The pages_user_locale permission allows your to app to a user's locale through the Page your app is connected to.
484   * <p>
485   * Allowed Usage
486   *
487   * <ul>
488   * <li>Personalize experiences based on the locale of a person by surfacing locale specific content.</li>
489   * <li>Send responses in the preferred language of the person.</li>
490   * <li>Display numbers, times, and dates correctly for the locale of the person.</li>
491   * </ul>
492   */
493  PAGES_USER_LOCALE("pages_user_locale", Category.EVENTS_GROUPS_PAGES), //
494
495  /**
496   * The pages_user_timezone permission grants your app access to a user's time zone through the Page your app is
497   * connected to.
498   * <p>
499   * Allowed Usage
500   *
501   * <ul>
502   * <li>Prevent messages from being sent at an inconvenient time.</li>
503   * <li>Send time sensitive content or recurring news at a specific time.</li>
504   * <li>Provide tailored content based on time.</li>
505   * <li>Send time appropriate greetings.</li>
506   * </ul>
507   */
508  PAGES_USER_TIMEZONE("pages_user_timezone", Category.EVENTS_GROUPS_PAGES), //
509
510  /**
511   * The {@code pages_manage_posts} permission allows your app the ability to create, edit, and delete your Page posts.
512   *
513   * <p>
514   * If you have access to {@code pages_read_user_content}, you can also use {@code pages_manage_posts} to delete Page
515   * posts created by a User.
516   *
517   * <p>
518   * You can use this permission to create and delete content on the Page.
519   *
520   * <p>
521   * <strong>Review</strong>
522   *
523   * <p>
524   * If your app requests this permission Facebook will have to review how your app uses it.
525   *
526   * @since June 1, 2020
527   */
528  PAGES_MANAGE_POSTS("pages_manage_posts", Category.EVENTS_GROUPS_PAGES), //
529
530  /**
531   * The {@code pages_manage_engagement} permission allows your app the ability to create, edit, and delete comments
532   * posted on the Page.
533   *
534   * <p>
535   * If you have access to {@code pages_read_user_content}, you can also use {@code pages_manage_engagement} to delete
536   * comments posted by other Pages.
537   *
538   * <p>
539   * It also allows your app the ability to create and delete your own Page's likes to Page content.
540   *
541   * <p>
542   * You can use this permission if you need it to help manage and moderate content on the Page.
543   *
544   * <p>
545   * <strong>Review</strong>
546   *
547   * <p>
548   * If your app requests this permission Facebook will have to review how your app uses it.
549   *
550   * @since June 1, 2020
551   */
552  PAGES_MANAGE_ENGAGEMENT("pages_manage_engagement", Category.EVENTS_GROUPS_PAGES), //
553
554  /**
555   * The private_computation_access permission allows an app to access the Meta Private Computation products.
556   * <p>
557   * <strong>Allowed Usage</strong>
558   * <ul>
559   * <li>Monitor private attribution datasets for a business.</li>
560   * <li>Monitor instances for private attribution datasets for a business.</li>
561   * <li>Create and manage instances for private attribution datasets for a business.</li>
562   * </ul>
563   */
564  PRIVATE_COMPUTATION_ACCESS("private_computation_access", Category.OTHER), //
565
566  /**
567   * Gives an app the ability to post content into a group on behalf of a user who has granted the app this permission.
568   *
569   * <p>
570   * <strong>Review</strong>
571   *
572   * <p>
573   * If your app requests this permission Facebook will have to review how your app uses it.
574   * 
575   * @deprecated no longer supported with Graph API 19.0 or after 22. April 2024
576   */
577  @GraphAPI(since = "3.0", until = "19.0")
578  @Deprecated
579  PUBLISH_TO_GROUPS("publish_to_groups", Category.EVENTS_GROUPS_PAGES), //
580
581  /**
582   * Grants an app permission to publish live videos to the app User's timeline.
583   *
584   * <p>
585   * <strong>Review</strong>
586   *
587   * <p>
588   * If your app requests this permission Facebook will have to review how your app uses it.
589   */
590  @GraphAPI(since = "3.1")
591  PUBLISH_VIDEO("publish_video", Category.LIVE_VIDEO), //
592
593  /**
594   * Gives your app the ability to receive member-related data on group content when a member has granted the app
595   * permission to do so.
596   *
597   * <p>
598   * <strong>Review</strong>
599   *
600   * <p>
601   * If your app requests this permission Facebook will have to review how your app uses it.
602   * 
603   * @deprecated no longer supported with Graph API 19.0 or after 22. April 2024
604   */
605  @GraphAPI(since = "3.0", until = "19.0")
606  @Deprecated
607  GROUPS_ACCESS_MEMBER_INFO("groups_access_member_info", Category.EVENTS_GROUPS_PAGES), //
608
609  /**
610   * Provides read-only access to the Audience Network Insights data for Apps the person owns.
611   *
612   * <p>
613   * <strong>Review</strong>
614   *
615   * <p>
616   * If your app requests this permission Facebook will have to review how your app uses it.
617   */
618  @GraphAPI(since = "2.4")
619  READ_AUDIENCE_NETWORK_INSIGHTS("read_audience_network_insights", Category.OTHER), //
620
621  /**
622   * The research_apis permission allows your app to access data on public Facebook Pages, Groups, and Events within the
623   * Facebook Open Research and Transparency Tool.
624   * <p>
625   * <strong>Allowed Usage</strong>
626   * <p>
627   * Utilize public Facebook data for academic research.
628   */
629  RESEARCH_APIS("research_apis", Category.OTHER), //
630
631  /**
632   * The read_insights permission allows your app to read the Insights data for Pages, apps and web domains the person
633   * owns.
634   * <p>
635   * <strong>Allowed Usage</strong>
636   * <ul>
637   * <li>Integrate Facebook's app, page or domain insights into your own analytics tools..</li>
638   * </ul>
639   */
640  READ_INSIGHTS("read_insights", Category.OTHER), //
641
642  /**
643   * Provides the ability to set a person's attendee status on Facebook Events (eg attending, maybe, or declined).
644   *
645   * <p>
646   * This permission does not let you invite people to an event.
647   *
648   * <p>
649   * This permission does not let you update an event's details.
650   *
651   * <p>
652   * This permission does not let you create an event. There is no way to create an event via the API as of Graph API
653   * v2.0.
654   *
655   * <p>
656   * <strong>Review</strong>
657   *
658   * <p>
659   * If your app requests this permission Facebook will have to review how your app uses it.
660   */
661  RSVP_EVENT("rsvp_event", Category.EVENTS_GROUPS_PAGES), //
662
663  /**
664   * Read and write with Business Management API
665   *
666   * <p>
667   * <strong>Review</strong>
668   *
669   * <p>
670   * If your app requests this permission Facebook will have to review how your app uses it.
671   */
672  BUSINESS_MANAGEMENT("business_management", Category.EVENTS_GROUPS_PAGES), //
673
674  /**
675   * Grants your app the ability to create, read, update, and delete business owned product catalogs that the user is an
676   * admin of. This permission grants access to related endpoints. By default, your app may only access product catalogs
677   * that are owned by admins of the app when in developer mode.
678   * 
679   * <p>
680   * <strong>Review</strong>
681   * 
682   * <p>
683   * If your app requests this permission Facebook will have to review how your app uses it.
684   */
685  CATALOG_MANAGEMENT("catalog_management", Category.EVENTS_GROUPS_PAGES), //
686
687  /**
688   * The gaming_user_locale permission allows your app to get a user's preferred language while the user plays a game on
689   * Facebook (for example, Instant Games or Cloud Gaming).
690   * <p>
691   * <strong>Allowed Usage</strong>
692   * <p>
693   * Display a game interface in the user's preferred language.
694   */
695  GAMING_USER_LOCALE("gaming_user_locale", Category.EVENTS_GROUPS_PAGES), //
696
697  /**
698   * Grants your app permission to retrieve all the information captured within a
699   * <a href="https://developers.facebook.com/docs/marketing-api/guides/lead-ads/">lead.</a>
700   *
701   * <p>
702   * <strong>Review</strong>
703   *
704   * <p>
705   * If your app requests this permission Facebook will have to review how your app uses it.
706   */
707  @GraphAPI(since = "3.1")
708  LEADS_RETRIEVAL("leads_retrieval", Category.EVENTS_GROUPS_PAGES), //
709
710  /**
711   * This allows you to send and receive messages through a Facebook Page out of the 24h window opened by a user action.
712   *
713   * <p>
714   * This permission cannot be used to send promotional or advertising content.
715   *
716   * <p>
717   * <strong>Review</strong>
718   *
719   * <p>
720   * If your app requests this permission Facebook will have to review how your app uses it.
721   */
722  @GraphAPI(since = "2.6")
723  PAGES_MESSAGING_SUBSCRIPTIONS("pages_messaging_subscriptions", Category.MESSAGING), //
724
725  /**
726   * This allows you to charge users in Messenger conversations on behalf of pages.
727   *
728   * <p>
729   * Intended for tangible goods only, not virtual or subscriptions.
730   *
731   * <p>
732   * <strong>Review</strong>
733   *
734   * <p>
735   * If your app requests this permission Facebook will have to review how your app uses it.
736   */
737  @GraphAPI(since = "2.6")
738  PAGES_MESSAGING_PAYMENTS("pages_messaging_payments", Category.MESSAGING),
739
740  // Instagram Platform permissions
741
742  /**
743   * Provides the ability to read Instagram accounts you have access to.
744   *
745   * <p>
746   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
747   * Guide</a> for details.
748   *
749   * <p>
750   * <strong>Review</strong>
751   *
752   * <p>
753   * If your app requests this permission Facebook will have to review how your app uses it.
754   */
755  @GraphAPI(since = "2.5")
756  INSTAGRAM_BASIC("instagram_basic", Category.INSTAGRAM),
757
758  /**
759   * Provides the ability to read Instagram accounts you have access to.
760   *
761   * <p>
762   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
763   * Guide</a> for details.
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 = "2.5")
772  INSTAGRAM_MANAGE_COMMENTS("instagram_manage_comments", Category.INSTAGRAM),
773
774  /**
775   * The instagram_manage_events permission allows an app permission to log events (e.g., purchase, add-to-cart, leads)
776   * on behalf of Instagram accounts administered by the app’s users. The allowed usage for this permission is to log
777   * events on Instagram accounts and send this activity data to Meta for ads targeting, optimization and reporting; and
778   * to provide marketing and advertising analytics insights. You may also use this permission to request analytics
779   * insights to improve your app and for marketing or advertising purposes, through the use of aggregated and
780   * de-identified or anonymized information (provided such data cannot be re-identified).
781   * <p>
782   * <strong>Allowed Usage</strong>
783   * <ul>
784   * <li>Get metadata of an Instagram Business account.</li>
785   * <li>Get data insights of an Instagram Business account.</li>
786   * <li>Get story insights of an Instagram Business account.</li>
787   * </ul>
788   */
789  INSTAGRAM_MANAGE_EVENTS("instagram_manage_events", Category.INSTAGRAM), //
790
791  /**
792   * Provides the ability to read insights of Instagram account you have access to.
793   *
794   * <p>
795   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
796   * Guide</a> for details.
797   *
798   * <p>
799   * <strong>Review</strong>
800   *
801   * <p>
802   * If your app requests this permission Facebook will have to review how your app uses it.
803   */
804  @GraphAPI(since = "2.5")
805  INSTAGRAM_MANAGE_INSIGHTS("instagram_manage_insights", Category.INSTAGRAM),
806
807  /**
808   * The instagram_manage_messages permission allows business users to read and respond to Instagram Direct messages.
809   * 
810   * <p>
811   * Please see <a href="https://developers.facebook.com/docs/instagram-api/getting-started">Instagram's Getting Started
812   * Guide</a> for details.
813   * 
814   * <p>
815   * <strong>Review</strong>
816   * 
817   * <p>
818   * If your app requests this permission Facebook will have to review how your app uses it.
819   */
820  INSTAGRAM_MANAGE_MESSAGES("instagram_manage_messages", Category.INSTAGRAM),
821
822  /**
823   * The instagram_shopping_tag_products permission allows an app to tag Instagram media with product tags and appeal
824   * product rejections.
825   * <p>
826   * <strong>Allowed Usage</strong>
827   * <ul>
828   * <li>Check eligibility for product tagging</li>
829   * <li>Get catalogs and products</li>
830   * <li>Tag media with product tags</li>
831   * <li>Manage existing product tags</li>
832   * <li>Appeal product rejections</li>
833   * </ul>
834   */
835  INSTAGRAM_SHOPPING_TAG_PRODUCTS("instagram_shopping_tag_products", Category.INSTAGRAM), //
836
837  /**
838   * Provides the ability to publish content to Instagram account you have access to.
839   *
840   * <p>
841   * Please see <a href="https://developers.facebook.com/docs/instagram-api/reference/user/media_publish">Instagram's
842   * reference</a> for details.
843   *
844   * <p>
845   * <strong>Review</strong>
846   *
847   * <p>
848   * If your app requests this permission Facebook will have to review how your app uses it.
849   */
850  @GraphAPI(since = "2.5")
851  INSTAGRAM_CONTENT_PUBLISH("instagram_content_publish", Category.INSTAGRAM), //
852
853  /**
854   * The instagram_branded_content_ads_brand permission allows an app to read Instagram posts where the app user's
855   * Instagram account is tagged as a paid partner, and an app user to read, request, and revoke permissions to run
856   * Partnership Ads.
857   * <p>
858   * <strong>Allowed Usage</strong>
859   * <ul>
860   * <li>Read Instagram posts where the account is tagged as a paid partner</li>
861   * <li>Manage permissions to run Partnership Ads without needing a pre-existing post</li>
862   * </ul>
863   */
864  INSTAGRAM_BRANDED_CONTENT_ADS_BRAND("instagram_branded_content_ads_brand", Category.INSTAGRAM), //
865
866  /**
867   * The instagram_branded_content_brand permission allows your app to add, remove and view creators from a specific
868   * brand’s approved creators list. The allowed usage for this permission is to manage a specific brand’s Instagram
869   * creator content settings. You may also use this permission to request analytics insights to improve your app and
870   * for marketing or advertising purposes, through the use of aggregated and de-identified or anonymized information
871   * (provided such data cannot be re-identified).
872   * <p>
873   * <strong>Allowed Usage</strong>
874   * <ul>
875   * <li>Manage branded creator content settings on a business’ Instagram account.</li>
876   * </ul>
877   */
878  INSTAGRAM_BRANDED_CONTENT_BRAND("instagram_branded_content_brand", Category.INSTAGRAM), //
879
880  /**
881   * The instagram_branded_content_creator permission allows your app to read and change the boost status of a creator’s
882   * specific piece of content. The allowed usage for this permission is to manage Instagram creator content settings.
883   * You may also use this permission to request analytics insights to improve your app and for marketing or advertising
884   * purposes, through the use of aggregated and de-identified or anonymized information (provided such data cannot be
885   * re-identified).
886   * <p>
887   * <strong>Allowed Usage</strong>
888   * <ul>
889   * <li>Read and change an Instagram creator’s content settings.</li>
890   * </ul>
891   */
892  INSTAGRAM_BRANDED_CONTENT_CREATOR("instagram_branded_content_creator", Category.INSTAGRAM), //
893
894  /**
895   * The instagram_graph_user_media permission allows your app to read the Media node, which represents an image, video,
896   * or album and the node’s edges.
897   * 
898   * <p>
899   * <strong>Review</strong>
900   *
901   * <p>
902   * If your app requests this permission Facebook will have to review how your app uses it.
903   */
904  INSTAGRAM_GRAPH_USER_MEDIA("instagram_graph_user_media", Category.INSTAGRAM), //
905
906  /**
907   * The instagram_graph_user_profile permission allows your app to read the app user's profile.
908   *
909   * <p>
910   * <strong>Review</strong>
911   *
912   * <p>
913   * If your app requests this permission Facebook will have to review how your app uses it.
914   */
915  INSTAGRAM_GRAPH_USER_PROFILE("instagram_graph_user_profile", Category.INSTAGRAM), //
916
917  INSTAGRAM_BUSINESS_BASIC("instagram_business_basic", Category.INSTAGRAM_BUSINESS), //
918
919  INSTAGRAM_BUSINESS_MANAGE_COMMENTS("instagram_business_manage_comments", Category.INSTAGRAM_BUSINESS), //
920
921  INSTAGRAM_BUSINESS_CONTENT_PUBLISH("instagram_business_content_publishing", Category.INSTAGRAM_BUSINESS), //
922
923  INSTAGRAM_BUSINESS_MANAGE_MESSAGES("instagram_business_manage_messages", Category.INSTAGRAM_BUSINESS), //
924  /**
925   * The user_media permission allows your app to read the Media node, which represents an image, video, or album and
926   * the node’s edges using the Instagram Basic Display API.
927   *
928   * <p>
929   * <strong>Review</strong>
930   *
931   * <p>
932   * If your app requests this permission Facebook will have to review how your app uses it.
933   */
934  USER_MEDIA("user_media", Category.INSTAGRAM_BASIC_DISPLAY), //
935
936  /**
937   * The user_profile permission allows your app to read the app user's profile using the Instagram Basic Display API.
938   *
939   * <p>
940   * <strong>Review</strong>
941   *
942   * <p>
943   * If your app requests this permission Facebook will have to review how your app uses it.
944   */
945  USER_PROFILE("user_profile", Category.INSTAGRAM_BASIC_DISPLAY), //
946
947  /**
948   * Provides the ability to read and/or manage WhatsApp business assets you own or have been granted access to by other
949   * businesses through this permission.
950   * <p>
951   * These business assets include WhatsApp business accounts, phone numbers, and message templates.
952   *
953   * <p>
954   * Please see <a href=
955   * "https://developers.facebook.com/docs/facebook-login/permissions/#reference-whatsapp_business_management">Whatsapps's
956   * reference</a> for details.
957   *
958   * <p>
959   * <strong>Review</strong>
960   *
961   * <p>
962   * If your app requests this permission Facebook will have to review how your app uses it.
963   */
964  WHATSAPP_BUSINESS_MANAGEMENT("whatsapp_business_management", Category.WHATSAPP),
965
966  /**
967   * The `whatsapp_business_messaging` permission allows an app to send WhatsApp messages to a specific phone number,
968   * upload and retrieve media from messages, manage and get WhatsApp business profile information, and to register
969   * those phone numbers with Meta.
970   *
971   * <p>
972   * Please see
973   * <a href= "https://developers.facebook.com/docs/permissions/reference/whatsapp_business_messaging">Whatsapps's
974   * reference</a> for details.
975   *
976   * <p>
977   * <strong>Review</strong>
978   *
979   * <p>
980   * If your app requests this permission Facebook will have to review how your app uses it.
981   */
982  WHATSAPP_BUSINESS_MESSAGING("whatsapp_business_messaging", Category.WHATSAPP),
983
984  /**
985   * Required for making any calls to all Threads API endpoints
986   *
987   * <p>
988   * <strong>Review</strong>
989   *
990   * <p>
991   * If your app requests this permission Facebook will have to review how your app uses it.
992   */
993  THREADS_BASIC("threads_basic", Category.THREADS),
994
995  /**
996   * Required for Threads publishing endpoints only
997   *
998   * <p>
999   * <strong>Review</strong>
1000   *
1001   * <p>
1002   * If your app requests this permission Facebook will have to review how your app uses it.
1003   */
1004  THREADS_CONTENT_PUBLISH("threads_content_publish", Category.THREADS),
1005
1006  /**
1007   * Required for making GET calls to insights endpoints
1008   *
1009   * <p>
1010   * <strong>Review</strong>
1011   *
1012   * <p>
1013   * If your app requests this permission Facebook will have to review how your app uses it.
1014   */
1015  THREADS_MANAGE_INSIGHTS("threads_manage_insights", Category.THREADS),
1016
1017  /**
1018   * Required for making POST calls to reply endpoints
1019   *
1020   * <p>
1021   * <strong>Review</strong>
1022   *
1023   * <p>
1024   * If your app requests this permission Facebook will have to review how your app uses it.
1025   */
1026  THREADS_MANAGE_REPLIES("threads_manage_replies", Category.THREADS),
1027
1028  /**
1029   * Required for making GET calls to reply endpoints
1030   *
1031   * <p>
1032   * <strong>Review</strong>
1033   *
1034   * <p>
1035   * If your app requests this permission Facebook will have to review how your app uses it.
1036   */
1037  THREADS_READ_REPLIES("threads_read_replies", Category.THREADS),
1038
1039  /**
1040   * The commerce_account manage_orders permission allows your app to read and update commerce account orders.
1041   *
1042   * <p>
1043   * <strong>Allowed Usage</strong>
1044   * <ul>
1045   * <li>Read orders in your commerce account.</li>
1046   * <li>Tech providers manage orders on behalf of their customers.</li>
1047   * <li>Access to Webhook notifications.</li>
1048   * </ul>
1049   */
1050  COMMERCE_ACCOUNT_MANAGE_ORDERS("commerce_account_manage_orders", Category.COMMERCE),
1051
1052  /**
1053   * The commerce_account_read_orders permission allows your app to read commerce account orders.
1054   * <p>
1055   * <strong>Allowed Usage</strong>
1056   * <ul>
1057   * <li>Read orders in your commerce account.</li>
1058   * <li>Use the buyer's email address for marketing purposes only if a buyer has opted-in at checkout.</li>
1059   * </ul>
1060   */
1061  COMMERCE_ACCOUNT_READ_ORDERS("commerce_account_read_orders", Category.COMMERCE),
1062
1063  /**
1064   * The commerce_account_read_reports permission allows your app to read finance reporting data to build custom tax,
1065   * cash reconciliation and reimbursement reports for a commerce account.
1066   * <p>
1067   * <strong>Allowed Usage</strong>
1068   * <ul>
1069   * <li>Read finance reporting data in your commerce account for building custom tax cash reconciliation and
1070   * reimbursement reports.</li>
1071   * <li>Tech providers can run finance reports on behalf of their customers.</li>
1072   * </ul>
1073   */
1074  COMMERCE_ACCOUNT_READ_REPORTS("commerce_account_read_reports", Category.COMMERCE),
1075
1076  /**
1077   * The commerce_account_read_settings permission allows your app to read commerce account settings. Allowed Usage
1078   * <ul>
1079   * <li>Read basic commerce account information like connected channels, shipping options, fulfillment locations, etc.
1080   * </ul>
1081   */
1082  COMMERCE_ACCOUNT_READ_SETTINGS("commerce_account_read_settings", Category.COMMERCE),
1083
1084  /**
1085   * The commerce_manage_accounts permission allows your app to create and manage commerce accounts, such as an
1086   * ecommerce app
1087   * <p>
1088   * <strong>Allowed Usage</strong>
1089   * <ul>
1090   * <li>Associate your app with your commerce account.</li>
1091   * <li>Tech providers create a commerce account on behalf of their customers.</li>
1092   * <li>Tech providers enable a new sales channel within their customer’s commerce account.</li>
1093   * </ul>
1094   */
1095  COMMERCE_MANAGE_ACCOUNTS("commerce_manage_accounts", Category.COMMERCE),
1096
1097  ;
1098
1099  private final String permissionString;
1100
1101  private final Category category;
1102
1103  FacebookPermissions(String facebookPermissionString, Category category) {
1104    this.permissionString = facebookPermissionString;
1105    this.category = category;
1106  }
1107
1108  public String getPermissionString() {
1109    return this.permissionString;
1110  }
1111
1112  public Category getCategory() {
1113    return this.category;
1114  }
1115
1116  public enum Category {
1117    PUBLIC,
1118    USER_DATA,
1119    EVENTS_GROUPS_PAGES,
1120    OTHER, MESSAGING, INSTAGRAM, INSTAGRAM_BASIC_DISPLAY, LIVE_VIDEO, WHATSAPP, COMMERCE, INSTAGRAM_BUSINESS, THREADS
1121  }
1122}