Created
July 21, 2009 06:13
-
-
Save atnan/151161 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FB_RequireFeatures(["Connect", "XFBML"], function() { | |
FB.init(FacebookConfig.api_key, "facebook_crossdomain_comm_channel.html"); | |
}); | |
function facebookRequestPermissionIfNecessary(permission, callback) { | |
FB.ensureInit(function() { | |
FB.Facebook.apiClient.users_hasAppPermission(permission, function(result) { | |
if (result == 0) { | |
FB.Connect.showPermissionDialog(permission, callback); | |
} else { | |
callback(true); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment