Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: PHP | Size: 0.76 KB | Hits: 58 | Expires: Never
Copy text to clipboard
  1. <?php if (!is_null($this->User) && !$this->User->getPromptedForPermission()):?>
  2. <script>
  3.         var dialog = new Dialog(Dialog.DIALOG_POP);
  4.         dialog.onconfirm = function () {
  5.                 Facebook.showPermissionDialog('publish_stream');
  6.                 document.cookie.promptedForPermission = true;
  7.         }
  8.         dialog.oncancel = function () {
  9.                
  10.         }
  11.         dialog.showChoice("Welcome", "What I've Read is your social way to share books with friends.  By allowing this application to publish to your stream your friends will see when you have started or finished a book and will be able to comment on them. When you click 'Okay' Facebook will ask you to grant us permission to publish","Okay", "No thanks");
  12. </script>
  13. <?php
  14.         $this->User->setPromptedForPermission(true);
  15.         $this->User->save();
  16. ?>
  17. <?php endif;?>