jquery - Facebook Feed Dialog disappearing -


i'm experiencing odd behavior. i'm using facebook's feed dialog javascript (fb.ui). working week ago, it's not. when click on button, facebook window shows up, after loading little time, automatically disappears without error messages. ideas? here's code below:

html:

<a href="#" class="button" id="fb-request">share friends</a> 

javascript:

$("#fb-request").click(function () {             fb.ui({                    method: 'feed',                    name: 'check out website',                    link: 'http://www.website.com',                    picture: 'http://website.com/f8.jpg',                    caption: 'a website.',                    description: 'website.',                    message: 'website'                },                function (response) {                    if (response && response.post_id) {                        alert('post published.');                    } else {                        alert('post not published.');                    }                }              );         }); 

i tested , worked no problem. getting errors in javascript console window? calling fb.init appid? , page being accessed domain/url specified on facebook app settings? have div id of "fb-root" on page? putting jquery call inside document.ready function? have tried different app id make sure current app id hasn't been blacklisted spamming?

my test worked:

<!doctype html> <html> <body> <div id="fb-root"></div> <a href="#" class="button" id="fb-request">share friends</a> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="http://connect.facebook.net/en_us/all.js"></script> <script>   fb.init({ appid  : '**yourappid**', status : true, cookie : true, xfbml  : true });    $(document).ready(function() {     $("#fb-request").click(function () {       fb.ui({         method: 'feed',         name: 'check out website',         link: 'http://www.website.com',         picture: 'http://website.com/f8.jpg',         caption: 'a website.',         description: 'website.',         message: 'website'       },       function (response) {         if (response && response.post_id) {           alert('post published.');         } else {           alert('post not published.');         }       });     });   }); </script> </body> </html> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -