有没有办法将 facebook 提要弹出(发布到你的墙上)放在 jquery 对话框中?这是我拥有的代码,它将使对话框和提要以不同的弹出窗口出现:
<script>
$(function() {
$( "#dialog-modal" ).dialog({autoOpen: false, resizable: false, draggable: false, height: 250, width: 500, modal: true, dialogCLass: 'main-dialog-class'});
$( "#opener" ).click(function() {
$( "#dialog-modal" ).dialog( "open" );
$.getJSON(
"/like_artist.php", // The server URL
{ artist_id : $(this).data('artist_id') }, // Data you want to pass to the server.
function(json) {
var text = '';
text = 'You want ' + json[1] + ' to play a show in your town! Increase the chances that ' + json[1] + ' comes through your area on tour by alerting your friends!';
$('#dialog-modal').text(text);
FB.ui({
method: 'feed'
});
alert(json[1]);
}// The function to call on completion.
);
});
});
</script>
建议赞赏!