开发者

Facebook Javascript UI for Posting to Wall Just Flickers

开发者 https://www.devze.com 2023-02-21 02:36 出处:网络
I am trying to make a Facebook dialogue appear when the user completes an event and so I built this function.

I am trying to make a Facebook dialogue appear when the user completes an event and so I built this function.

function post_to_wall_popup(){
            FB.init({ apiKey: 'Super Secret API Key' });
            var publish = {
                method: 'stream.publish',
                attachment: {
                    name: 'XYZ',
                    caption: 'caption here',
                    description: ('description'),
                    href: 'url',
                media: [{
                    type: 'image',
                    href: 'url',
                    src: 'xyz.gif'
                }]
               开发者_C百科 },
                action_links: [{ text: 'XYZ', href: 'url' }]
            };  

            FB.ui(publish,null);


    }

I have tried a few different examples that are supposed to have similar results but on each one all I get is the dialog box with "Loading.." for a split second, then it disappears. Has anyone else ever come across a similar problem?


Make sure that fb-root is defined & visible.

0

精彩评论

暂无评论...
验证码 换一张
取 消