Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function get_permission() {
  2.   FB.ensureInit(function() {
  3.     FB.Connect.showPermissionDialog('publish_stream', function(perms) {
  4.       re = /publish_stream/gi;
  5.       if (!re.test(perms)) {
  6.         alert('publish_stream denied');
  7.       } else {
  8.         FB.Connect.showPermissionDialog('email', function(perms) {
  9.             re = /email|contact_email/gi;
  10.             if (!re.test(perms)) {
  11.               alert('email denied');
  12.             } else {
  13.               window.location.reload(true)
  14.             }
  15.         });
  16.       }
  17.     });
  18.   });
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement