windows - Facebook integration with javascript FB Graph api Post on wall Unknown error in firefox -


i posting on user`s wall using fb graph api function post on wall follow:

 function posttowall()  {        var mymessage = 'my message';       var mypic = 'http://myapp/a.jpg';       var mylink = 'http://www.myapp.com';       var myname = 'myapp';       var mydesc = 'my desc .';       fb.api('/me/feed', 'post', { message: mymessage, picture: mypic, link: mylink, name: myname, description: mydesc }, function (response) {             if (!response || response.error) {                        alert(response.error.message);             } else {                         alert('post id: ' + response.id);              }       });       // alert('do want continue ? ');  }; 

it works fine in crome when use same in firefox prompts unknown error alert(response.error.message); .and in error console of firefox error

error: uncaught exception: [exception... "prompt aborted user"  nsresult: "0x80040111 (ns_error_not_available)"  location: "js frame :: resource://gre/components/nsprompter.js :: opentabprompt :: line 468"  data: no] 

i found solution prompt user before end of function see last line alert('do want continue ? '); . when write alert works fine in firefox not want promt user message. problem , solution ?

i using firefox 5.0 . , operating system windows 7.

postonwall function called function follow:

function f(){       posttowall();     ...     ...     //code click submit button } 

i have written code click submit button in callback handler follow:

function posttowallcallbackhandler(response) {      if (!response || response.error) {          alert(response.error.message);      } else {           document.getelementbyid('fbsubmit').click();      }  }  function posttowall(mymessage,mypic,mylink,myname,mydesc,callbackhandler) {      fb.api('/me/feed', 'post', { message: mymessage, picture: mypic, link: mylink, name: myname, description: mydesc },function (response){callbackhandler(response);} );  }; 

it works fine both crome , firefox,safari , ie 9.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -