Facebook Open Graph 获取共享 - 重新加载缓存问题

Facebook Open Graph get shares - reload cache issue

我已经使用 Facebook Open Graph Shares 实现了一个共享计数器,这里是代码:

        <script>
          function GetShareTargetCMS(){
            var token = 'XXXXXXXXXXXXXXX|YYYYYYYYYYYYYYYYYYYY';
             $.ajax({
               url: 'https://graph.facebook.com/',
                 dataType: 'jsonp',
                 type: 'POST',
                 cache: false,
                 data: {access_token: token, id: "http://url-to-share", scrape:true  },
                 success: function(data){
                   console.log(data.share);
                     if(typeof data.share != 'undefined'){
                       $('.results_share').empty().html('<span>'+data.share.share_count+'</span>');
                     }else{
                       $('.results_share').empty().html('<span>0</span>');
                     }//else
                 }//success
             });
          }//GetShareTargetCMS
          //Get Condivisioni
          $(document).ready(function() {
              GetShareTargetCMS();
           });
           //Get Condivisioni


    //Share trigger dialog
    document.getElementById('shareBtn').onclick = function() {
              FB.ui({
                method: 'share',
                mobile_iframe: true,
                href: "http://url-to-share",
              }, function(response){ GetShareTargetCMS(); });
            }

</script>

默认情况下,document ready 中调用的函数会在 dive 中打印当前页面的共享计数器。如果用户单击 .shareBtn,我将打开一个共享对话框。共享成功后,我会重新调用共享功能以重新加载并更新共享计数。我不知道原因,但计数器没有刷新。刷新计数器的唯一方法是重新加载页面。有什么建议吗?

我试过了:

尝试在刷新分享数之前设置超时

document.getElementById('shareBtn').onclick = function() {
          FB.ui({
            method: 'share',
            mobile_iframe: true,
            href: "http://url-to-share",
      }, function(){setTimeout(function(){GetShareTargetCMS()},1000) });
}