2011-07-20 16 views
7

Kullanıcıların kendi duvarlarına sitemden gönderebilmelerini istiyorum. Gönderime FB bağlantısına tıkladığımda, Facebook açılır penceresi "Bir Hata Oluştu. Lütfen daha sonra tekrar deneyin." Firebug, hatanın "Görüntü bozuk veya kesilmiş:" olduğunu söylüyor. FB.login veya FB.getLoginStatus gibi herhangi bir FB yöntemini denerseniz aynı mesajı alırım. Biliyorum ki, bu kapalı bir şey değil, ama herkesin neyin yanlış gittiğine dair fikirleri var mı, yoksa bunu hata ayıklamak için daha iyi bir yolu var mı?Facebook API ile duvara yayınlayın

function load_FB(){ 
    FB.init({ 
    appId : xxxxxxxxxxxxxxxx, 
    status : true, 
    cookie : true, 
    xfbml : true 
    }); 
} 

var publish = {method: 'feed', message: 'my message'}; 
function publish_wall_post() 
{ 
    FB.ui(publish); 
} 

cevap

3

https://developers.facebook.com/docs/reference/javascript/FB.ui/

FB.ui(
    { 
    method: 'feed', 
    name: 'Facebook Dialogs', 
    link: 'https://developers.facebook.com/docs/reference/dialogs/', 
    picture: 'http://fbrell.com/f8.jpg', 
    caption: 'Reference Documentation', 
    description: 'Dialogs provide a simple, consistent interface for applications to interface with users.', 
    message: 'Facebook Dialogs are easy!' 
    }, 
    function(response) { 
    if (response && response.post_id) { 
     alert('Post was published.'); 
    } else { 
     alert('Post was not published.'); 
    } 
    } 
); 
+0

de FB.ui docs bir göz atın Bu kodu çalıştı ve tam olarak aynı sonucu aldık. – mill