2011-07-20 12 views
7

私は、ユーザーが自分のサイトから壁に投稿できるようにしたいと考えています。私がFB提出のリンクをクリックすると、Facebookのポップアップに「エラーが発生しました。しばらくしてからもう一度お試しください」と表示されます。 Firebugはエラーが "Image corrupt or truncated:"と表示しているだけです。 FB.loginやFB.getLoginStatusのようなFBメソッドを試しても、同じメッセージが表示されます。私はそれが離れて行くことはたくさんありませんが、誰が何がうまくいかないか、またはこれをデバッグするためのより良い方法のアイデアを持っていますか?Facebook APIを使用して壁に公開する

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); 
} 

答えて

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

でFB.uiのドキュメントを見て、私はこのコードを試してみましたが、まったく同じ結果を得ました。 – mill