Question

I have multiple apps which use the fb:friend-selector

The form element is no longer appearing. Nothing has changed in the code.

Example:

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({
      appId  : 'myyappid',
      status : true, // check login status
      cookie : true, // enable cookies to allow the server to access the session
      xfbml  : true,  // parse XFBML
      channelUrl  : 'http://mydomain.com/channel.html', // Custom Channel URL
      oauth : true //enables OAuth 2.0
    });
  };

  (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>

<fb:serverfbml> 
<script type="text/fbml">
<fb:fbml> 

<fb:friend-selector />

</fb:fbml>
</script>
</fb:serverfbml>
Was it helpful?

Solution

Just found a solution, ditch the standard html <form> and use the <fb:editor> instead. Yes, this is perhaps not exactly what you want, but now the <fb:friend-selector> will render.

OTHER TIPS

try to explixitly parse the XFBML using FB.XFBML.parse:
http://developers.facebook.com/docs/reference/javascript/FB.XFBML.parse/

I'd also recommend to put it inside some div element
FB.XFBML.parse(document.getElementById('MY_DIV'));

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top