Reputation: 376
How i can create a custom dialog like this:
I'm using iframe application with graph api/new js-api, but i cant figureout a way to reproduce this, the buttons and the title, keep the user languague.
regards.
Upvotes: 3
Views: 6732
Reputation: 11
You can use this:
var dialog = FB.Dialog.create({
content: '<div style="color: rgb(255, 255, 255); background-color: rgb(109, 132, 180); font-size: 15px; font-weight: bold; padding: 5px; text-align: left;">Error</div><p style="margin:10px 15px;">' + message + '</p><div style="color: rgb(0, 0, 0); background-color: rgb(242, 242, 242); padding: 8px; text-align: right; border-top: 1px solid rgb(198, 198, 198);height:23px;"></div>',
closeIcon: true,
onClose: function() {
FB.Dialog.remove(dialog);
},
visible: true
});
See also: http://fbdevwiki.com/wiki/FB.Dialog
Upvotes: 1
Reputation: 4348
I suspect they are doing their own modal dialog using something like the jquery Facebox plugin at http://defunkt.io/facebox/
They also appear to be violating Facebook policy by using an unapproved ad provider (AdBrite) on a canvas page.
Upvotes: 1
Reputation: 1860
You have to use the FB.ui
method to open a dialog like this. You can find example code and more details here.
Upvotes: 0