I am trying to create a facebook application using iframe (not fbml). I am using php client. after many attempts, I cannot publish the stream, nor can I create a popup to ask the user to get extended permission. I used the following:
function facebook_prompt_permission(permission)
{
ensure_init(function()
{
FB.Facebook.apiClient.users_hasAppPermission(permission,
function(result) {
if (result == 0)
{
alert(result);
FB.Connect.showPermissionDialog(permission,function(result)
{
if (result == null)
alert('no permissons granted');
else
alert('permissions ' + result);
},true,null);
}
else
{
alert("permission already granted");
}
});
});
}
facebook_prompt_permission('publish_stream');
The response to the permission check comes in as 0, but when I try to FB.Connect.showPermissionDialogshow a popup to ask the user for permission, nothing happens; no popups.
source
share