I am creating a facebook connection application for publishing content to user threads. To do this, I need to get extended publish_stream permission from users. I am using function code for this.
Check connection status
<input type="button" onclick="statusSubmit('Permission to publish : ');" value="Check connection status" />
<script type="text/javascript">
function statusSubmit(status)
{
facebook_prompt_permission('publish_stream', function(accepted)
{
if(accepted) {
alert(status + 'already granted');
}
else
{
alert(status + ' not granted');
}
});
}
function facebook_prompt_permission(permission, callbackFunc)
{
FB.ensureInit(function() {
FB.Connect.requireSession(function(){
FB.Facebook.apiClient.users_hasAppPermission(permission,
function(result) {
if (result == 0) {
FB.Connect.showPermissionDialog(permission,
function(result){
if (null == result)
alert('no permissons granted');
else
alert('permissions ' + result);
}, true, null);
} else {
callbackFunc(true);
}
});
});
});
}
</script>
After the rights dialog box opens and the user grants permissions, redirecting my current page to my local development machine. According to my settings, I cannot control this redirection behavior. I tried changing the "Post-Authorize Callback URL" to a public page, but it is not called. Is there something I'm missing? I would like either
- Get the callback url after authorization for something that works OR
- , ,
. .
.