None of my callbacks trigger when I use facebook ui requests(callbacks for fetching friends etc work fine)
For example if I trigger the FB pay window with the "pay" requests. If pops up and everything works fine, but I don't get any callbacks if the user actually paid or cancelled the request. I have the same problem with all my FB requests, they pop up fine but callbacks in the client don't trigger.
Anyone had this problem before or know a solution?
I'm thinking there is something wrong with my javascript in the master file. I use this, it's mostly just copied from the examples from playerIO and some stuff cut away
It looks like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
{% require_session %}
<link rel="stylesheet" href="{% url 'style.css' %}" />
<script type="text/javascript" language="javascript">
// this array will contain a list of functions that will be
// called when facebook is fully loaded and user is logged in.
var onFacebookAvailable = []
// will execute all queued up methods.
function runOnFacebookAvailable() {
for (var i = 0; i != onFacebookAvailable.length; i++) {
var cb = onFacebookAvailable[i];
cb();
}
}
</script>
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script type="text/javascript" src="{% url 'nutsforlovejs.js' %}"></script>
</head>
<body>
<div id="content">
{% block content %}{% end %}
</div>
<div id="fb-root"></div>
<script type="text/javascript" language="javascript">
window.fbAsyncInit = function() {
FB.init({
appId: '{{fb_application_id}}',
frictionlessRequests : true,
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
FB.getLoginStatus(function(response) {
if (response.session) {
runOnFacebookAvailable()
} else {
FB.Event.subscribe('auth.login', runOnFacebookAvailable);
}
});
FB.Canvas.setAutoResize();
};
(function() {
var e = document.createElement('script');
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
} ());
</script>
</body>
</html>