Facebook App - Works great in everything but IE (two issues) [closed]
My brains a bit dead after the past 72 hours coding this project; hoping one could help two of the issues I'm having.
The app -> (url redirects to facebook) http://www.myfbcourses.com and if that doesn't work the direct url is http://apps.facebook.com/myfbcourses/
Now, in Safari/FireFox/Chrome this app works perfect. Just not in IE. My two issues:
1) When I invoke Jquery's Ajax, it doesn't show the content returning i.e. Pretty basic code, I don't know why it returns nothing on IE though.
$.ajax({
type: "POST",
url: "call.php",
data: "i=postTopic&cid="+i+"&comments="+comments+"&title="+title,
success: function(msg){
alert(msg);
}
});
2) In IE; Even after authorizing / and fb-logging-in it doesn't seem it's authenticated. I think in IE8 it kept looping the redirect to the page.. No idea
Would love the help! Thank you!
It's an AJAX issue, I'm assuming your file is not hosted in the same server than your ajax call. So instead you have to use JSOP.
So then try:
$.ajax({
type: "POST",
url: "call.php",
data: ({"i" :postTopic, "cid" :i, "comments" : comments, "title" : title}),
success: function(msg){
alert(msg);
}
});
I figured out the issue... Don't forget to include type=text/javascript
in your code
精彩评论