如何检测facebook嵌入的帖子是否有效

时间:2014-02-15 04:26:13

标签: javascript jquery facebook jquery-ui

我正在构建一个Facebook应用程序,需要在此过程中显示实际的Facebook帖子。这很好,但如果要显示的帖子消失或隐私设置错误,您如何检测到并采取其他操作,而不是显示帖子不可见。我想在一个单独的标签中打开帖子。但我无法进入iframe看看发生了什么

我整理了一个jfiddle来展示它 - 无效帖子不是帖子,但我认为详细说明问题,因为帖子可能已被删除

    //if(check for nolonger available message){
          console.log($("fb-post").contents().find('body').html);
    //    alert("open another tab");
    //}else{
    var menu = $('#postmenu').show().position({
        my: "right top",
        at: "right bottom",
        of: this
    });
    //}

    return false;
}

0 个答案:

没有答案