I'm trying to add a form to a Facebook page through "Static HTML: iframe tabs" app. I am using jQuery,ajax,php to send the form and recieve success or error. When I run the form outside of Facebook iFrames everything works fine. But, on iFrames I've encountered two problems:
- AJAX call fails each time. It returns error value and does not pass values.
- Google chrome gives me "this page has insecure content"
here is my ajax call:
$.ajax({
type: "POST",
url: "send.php",
contentType: "application/x-www-form-urlencoded; charset=utf-8;",
data: data_string,
dataType: 'html',
success: function(data){
alert('success');
},
error: function() {
alert('error');
}
});
Thanks in advance.
Solved. The problem was indeed Facebook's demand for secure connections in iFrames. All that needed to be done was to store the file on a web hosting service with SSL. Then make sure all links on html pages are with "https".
This solved both of the problems stated above.