2011-06-02 92 views
2

我想在我的BB超級應用程序中嵌入fb和twitter分享,但不幸的是BB不支持彈出窗口。有什麼方法可以在我的應用中嵌入fb和twitter分享,就像我們在博客中一樣。blackberry webworks facebook分享

檢查代碼彈出。

 function share(){ 

     var share = { 
       method: 'stream.share', 
       u: 'http://www.example.com' 
      }; 

      FB.ui(share, function(response) { console.log(response); });*/ 
     /* $('#iframeDiv').show(); 

      ServerCall(0,'html','shareFb.php',function(data) 
      { 
       //$('#Shareiframe').attr('src','http://m.facebook.com/sharer.php?u='+escape('http://www.astrochicks.com')); 
       $('#iframeDiv').html(data); 
      }); 
      */ 
    } 
    /*SHARE TWITTER START*/ 
    var shareTweet = function() 
    { 
     f='http://twitter.com/share?url='+encodeURIComponent(window.location.href)+'&text='+encodeURIComponent(document.title); 

     a=function() 
     { 
      //if(!window.open(f)) 
      //location.href=f; 
      window.open(f,'twitterShare','width=500,height=400'); 
     }; 
     a(); 

     /*if(/Firefox/.test(navigator.userAgent)) 
     { 
     setTimeout(a,0) 
     } 
     else 
     { 

     }*/ 
    }; 

是否可以使用一些隱藏的iframe在主頁內?

感謝

回答

0

您必須在項目

function openURL(url) 
{ 

    var args = new blackberry.invoke.BrowserArguments(url); 

    blackberry.invoke.invoke(blackberry.invoke.APP_BROWSER, args); 

}