I have an application which will post a message on a friends wall using the Facebook.streamPublish() method, and this works perfectly. However, I want to also be able to save details about this post in my database.
All the information that needs to be stored is placed into hidden form fields and are all in place once the message has been sent, so I figure that all I need to do is redirect to a php file which will take this information, save it into the database and then redirect back to the main page.
The streamPublish call is:
Facebook.streamPublish(\'\', attachment, null, params.ids[curFriend]);
which I can follow with form.submit() which will cause the redirect to happen, but this submit() function gets called instantly, and doesn't wait for the streamPublish() popup to load, be used, and the action to be completed. How can I make my form.submit() not be called until the user has hit the 'publish' button in the popup which occurs?