You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.4 KiB

  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>Favoriting</title>
  5. </head>
  6. <body>
  7. <script>
  8. function favorite_finished() {
  9. self.close();
  10. }
  11. </script>
  12. <script src="/favorite.js?url=<?= urlencode($this->url) ?>&amp;token=<?= $this->token ?>"></script>
  13. <?php /*
  14. <script>
  15. window.quillFbInit = function() {
  16. FB.getLoginStatus(function(response) {
  17. if (response.status === 'connected') {
  18. // the user is logged in and has authenticated your
  19. // app, and response.authResponse supplies
  20. // the user's ID, a valid access token, a signed
  21. // request, and the time the access token
  22. // and signed request each expire
  23. var uid = response.authResponse.userID;
  24. var accessToken = response.authResponse.accessToken;
  25. console.log(accessToken);
  26. FB.api("/<?= $this->facebook_id ?>/likes", "post", function(response){
  27. console.log(response);
  28. show_star();
  29. });
  30. } else if (response.status === 'not_authorized') {
  31. // the user is logged in to Facebook,
  32. // but has not authenticated your app
  33. console.log("Logged in but not authorized");
  34. } else {
  35. // the user isn't logged in to Facebook.
  36. console.log("User isn't logged in");
  37. }
  38. });
  39. };
  40. </script>
  41. <?= partial('partials/fb-script') ?>
  42. */ ?>
  43. </body>
  44. </html>