2010-10-08 13 views
4

J'utilise FB Connect depuis un certain temps maintenant. Le code ci-dessous a fonctionné correctement depuis que je l'ai implémenté.Facebook Connect FB.CommentClient.add_onComment Méthode inexplicablement arrêtée de fonctionner

Dans la dernière semaine, j'ai fait quelques configurations de serveur pour activer mod_deflate et il a cessé de fonctionner. Les commentaires fonctionnent, seule la fonction de rappel a cessé de fonctionner.

Quelqu'un a-t-il eu une expérience similaire? Quelqu'un peut-il recommander une solution?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 
"http://www.w3.org/TR/html4/frameset.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
</head> 
<body> 
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> 
<fb:comments></fb:comments> 
<script type="text/javascript" language="JavaScript"> 
FB_RequireFeatures(["XFBML"], function(){ 
    FB.Facebook.init("myapikeygoeshere", "{site_url}connect/xd_receiver.htm"); 
    FB_RequireFeatures(["Comments"], function() { 
    FB.CommentClient.add_onComment(function(comment){ 
     alert("after"); 
    }); 
    });  
}); 
</script> 
</body> 
</html> 

Voici quelques liens utiles:

http://drupal.org/node/715862 http://www.daffodilsw.com/blog/2009/11/Add-Facebook-Comment-box-in-Site.html http://developers.facebook.com/docs/reference/fbml/

Répondre

1

la solution:

Mise à jour vers la nouvelle version du SDK. Plus on a des bugs ...

Dans la nouvelle version ce serait comme aller:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" 
"http://www.w3.org/TR/html4/frameset.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> 
<head> 
</head> 
<body> 
<fb:comments xid="1" canpost="true" candelete="true" numposts="10" showform="true" notify="true" returnurl="[[my url goes here]]"> 
</fb:comments> 
<div id="fb-root"></div> 
<script src="http://connect.facebook.net/en_US/all.js"></script> 
<script> 
    FB.init({ 
     appId : "[[my app id goes here]]", 
     status: true, 
     cookie: true, 
     xfbml : true 
    }); 
    FB.Event.subscribe('comments.add',function(resp){ 
    alert('comment added'); 
    }); 
</script> 
</body> 
</html>