Aucune description

getting-started.php 9.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. defined('ABSPATH') || die();
  3. /** @var $this NextendSocialProviderAdmin */
  4. $lastUpdated = '2021-09-09';
  5. $provider = $this->getProvider();
  6. ?>
  7. <div class="nsl-admin-sub-content">
  8. <?php if (substr($provider->getLoginUrl(), 0, 8) !== 'https://'): ?>
  9. <div class="error">
  10. <p><?php printf(__('%1$s allows HTTPS OAuth Redirects only. You must move your site to HTTPS in order to allow login with %1$s.', 'nextend-facebook-connect'), 'Facebook'); ?></p>
  11. <p>
  12. <a href="https://nextendweb.com/nextend-social-login-docs/facebook-api-changes/#enforce-https" target="_blank"><?php _e('How to get SSL for my WordPress site?', 'nextend-facebook-connect'); ?></a>
  13. </p>
  14. </div>
  15. <?php else: ?>
  16. <div class="nsl-admin-getting-started">
  17. <h2 class="title"><?php _e('Getting Started', 'nextend-facebook-connect'); ?></h2>
  18. <p><?php printf(__('To allow your visitors to log in with their %1$s account, first you must create a %1$s App. The following guide will help you through the %1$s App creation process. After you have created your %1$s App, head over to "Settings" and configure the given "%2$s" and "%3$s" according to your %1$s App.', 'nextend-facebook-connect'), "Facebook", "App ID", "App secret"); ?></p>
  19. <p><?php do_action('nsl_getting_started_warnings', $provider, $lastUpdated); ?></p>
  20. <h2 class="title"><?php printf(_x('Create %s', 'App creation', 'nextend-facebook-connect'), 'Facebook App'); ?></h2>
  21. <ol>
  22. <li><?php printf(__('Navigate to %s', 'nextend-facebook-connect'), '<a href="https://developers.facebook.com/apps/" target="_blank">https://developers.facebook.com/apps/</a>'); ?></li>
  23. <li><?php printf(__('Log in with your %s credentials if you are not logged in.', 'nextend-facebook-connect'), 'Facebook'); ?></li>
  24. <li><?php _e('Click on the "<b>Create App</b>" button and in the Popup choose the "<b>Consumer</b>" App type!', 'nextend-facebook-connect'); ?></li>
  25. <li><?php _e('If you see the message "<b>Become a Facebook Developer</b>", then you need to click on the green "<b>Register Now</b>" button, fill the form then finally verify your account.', 'nextend-facebook-connect'); ?></li>
  26. <li><?php printf(__('Fill "<b>App Display Name</b>", "<b>App Contact Email</b>". The specified "App Display Name" will appear on your %s!', 'nextend-facebook-connect'), '<a href="https://developers.facebook.com/docs/facebook-login/permissions/overview/" target="_blank">Consent Screen</a>'); ?></li>
  27. <li><?php _e('<b>Optional</b>: choose a "<b>Business Manager Account</b>" in the popup, if you have any.', 'nextend-facebook-connect'); ?></li>
  28. <li><?php _e('Click the "<b>Create App</b>" button and complete the Security Check.', 'nextend-facebook-connect'); ?></li>
  29. <li><?php printf(__('Find "<b>%1$s</b>" and click "<b>Set Up</b>".', 'nextend-facebook-connect'), 'Facebook Login', 'Settings') ?></li>
  30. <li><?php printf(__('Select "<b>Web</b>" and enter the following URL to the "<b>Site URL</b>" field: <b>%s</b>', 'nextend-facebook-connect'), site_url()); ?></li>
  31. <li><?php _e('Press “<b>Save</b>”.', 'nextend-facebook-connect'); ?></li>
  32. <li><?php printf(__('Click on the “<b>%1$s</b>” option what you find on the left side, under “<b>%2$s</b> - <b>%3$s</b>”', 'nextend-facebook-connect'), 'Settings', 'Products', 'Facebook Login') ?></li>
  33. <li><?php
  34. $loginUrls = $provider->getAllRedirectUrisForAppCreation();
  35. printf(__('Add the following URL to the "<b>Valid OAuth redirect URIs</b>" field:', 'nextend-facebook-connect'));
  36. echo "<ul>";
  37. foreach ($loginUrls as $loginUrl) {
  38. echo "<li><strong>" . $loginUrl . "</strong></li>";
  39. }
  40. echo "</ul>";
  41. ?>
  42. </li>
  43. <li><?php _e('Click on “<b>Save Changes</b>”.', 'nextend-facebook-connect'); ?></li>
  44. <li><?php printf(__('On the top left side, click on the “<b>%1$s</b>” menu point, then click “<b>%2$s</b>”.', 'nextend-facebook-connect'), 'Settings', 'Basic') ?></li>
  45. <li><?php printf(__('Enter your domain name to the "<b>App Domains</b>" field, probably: <b>%s</b>', 'nextend-facebook-connect'), str_replace('www.', '', $_SERVER['HTTP_HOST'])); ?></li>
  46. <li><?php _e('Fill up the "<b>Privacy Policy URL</b>" field. Provide a publicly available and easily accessible privacy policy that explains what data you are collecting and how you will use that data.', 'nextend-facebook-connect'); ?></li>
  47. <li><?php _e('At "<b>User Data Deletion</b>", choose the "<b>Data Deletion Instructions URL</b>" option, and enter the <i>URL of your page</i>* with the instructions on how users can delete their accounts on your site.', 'nextend-facebook-connect'); ?>
  48. <ul>
  49. <li><?php _e('To comply with GDPR, you should already offer possibility to delete accounts on your site, either by the user or by the admin:', 'nextend-facebook-connect'); ?></li>
  50. <li>
  51. <ul>
  52. <li><?php _e('<u>If each user has an option to delete the account</u>: the URL should point to a guide showing the way users can delete their accounts.', 'nextend-facebook-connect'); ?></li>
  53. <li><?php _e('<u>If the accounts are deleted by an admin</u>: then you should have a section - usually in the Privacy Policy - with the contact details, where users can send their account erasure requests. In this case the URL should point to this section of the document.', 'nextend-facebook-connect'); ?></li>
  54. </ul>
  55. </li>
  56. </ul>
  57. </li>
  58. <li><?php _e('Select a “<b>Category</b>”, an “<b>App Icon</b>” and pick the “<b>App Purpose</b>” option that describes your App the best, then press "<b>Save Changes</b>".', 'nextend-facebook-connect'); ?></li>
  59. <li><?php _e('Your application is currently private, which means that only you can log in with it. In the top bar switch the "<b>App Mode</b>" from "<b>Development</b>" to "<b>Live</b>".', 'nextend-facebook-connect'); ?></li>
  60. <li><?php printf(__('By default, your application only has Standard access for the permissions, which is not enough for %1$s.<br>On the left side, click on <strong>%2$s</strong> then click <strong>%3$s</strong>. In the table you will find the "<strong>%4$s</strong>" and "<strong>%5$s</strong>" permissions and you should click on the <strong>%6$s</strong> buttons next to them. ', 'nextend-facebook-connect'), 'Facebook Login', 'App Review', 'Permissions and Features', 'public_profile', 'email', 'Get Advanced Access'); ?></li>
  61. <li><?php printf(__('On the top left side, click on the “<b>%1$s</b>” menu point, then click “<b>%2$s</b>”.', 'nextend-facebook-connect'), 'Settings', 'Basic') ?></li>
  62. <li><?php printf(__('At the top of the page you can find your "<b>%1$s</b>" and you can see your "<b>%2$s</b>" if you click on the "Show" button. These will be needed in plugin’s settings.', 'nextend-facebook-connect'), 'App ID', 'App secret'); ?></li>
  63. </ol>
  64. <p><?php printf(__('<b>WARNING:</b> <u>Don\'t replace your Facebook App with another!</u> Since WordPress users with linked Facebook accounts can only login using the %1$s App, that was originally used at the time, when the WordPress account was linked with a %1$s Account.<br>
  65. If you would like to know the reason of this, or you really need to replace the Facebook App, then please check our %2$sdocumentation%3$s.', 'nextend-facebook-connect'), 'Facebook', '<a href="https://nextendweb.com/nextend-social-login-docs/provider-facebook/#app_scoped_user_id" target="_blank">', '</a>'); ?></p>
  66. <br>
  67. <h2 class="title"><?php _e('Maintaining the Facebook App:', 'nextend-facebook-connect'); ?></h2>
  68. <p><?php printf(__('<strong><u>Facebook Data Use Checkup:</u></strong> To protecting people\'s privacy, Facebook might requests you to fill some forms, so they can ensure that your API access and data use comply with the Facebook policies.
  69. If Facebook displays the "%1$s" modal for your App, then in our %2$sdocumentation%3$s you can find more information about the permissions that we need.', 'nextend-facebook-connect'), 'Data Use Checkup', '<a href="https://nextendweb.com/nextend-social-login-docs/provider-facebook/#data_use_checkup" target="_blank">', '</a>'); ?></p>
  70. <a href="<?php echo $this->getUrl('settings'); ?>"
  71. class="button button-primary"><?php printf(__('I am done setting up my %s', 'nextend-facebook-connect'), 'Facebook App'); ?></a>
  72. </div>
  73. <br>
  74. <div class="nsl-admin-embed-youtube">
  75. <div></div>
  76. <iframe src="https://www.youtube.com/embed/giHaGhjuh2A?rel=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
  77. </div>
  78. <?php endif; ?>
  79. </div>