Facebook multi-friend-selector + new javascript API = BROKEN?

蹲街弑〆低调 提交于 2019-12-07 13:02:40

问题


I am using the fb:serverfbml tag to render a multi-friend-selector inside an IFrame.

I am using the new javascript API. I have been trying ALL DAY to get it working.

When I click on the underlines 'selected' link (to filter by the selected friends) the whole page refreshes and the selected friends disappear.

Does the multi-friend-selector just not work with the javascript API?

<fb:serverfbml> 
    <script type="text/fbml"> 
        <fb:request-form action="http://apps.facebook.com/rollingrazor/" target="_top" method="POST" invite="true" type="Blah blah blah" 
        content="Blah blah! &lt;fb:req-choice url=&quot;http://apps.facebook.com/rollingrazor/&quot; label=&quot;Let me check my friends&quot; /&gt;">
            <fb:multi-friend-selector showborder="false" actiontext="Invite your friends"  rows="5" cols="5"  bypass="cancel" target="_top"  /> 
        </fb:request-form>
    </script> 
</fb:serverfbml> 

<div id="fb-root"></div>

<script>
  window.fbAsyncInit = function () {
   FB.init({ appId: 'xxxxxxx', status: true, cookie: true,
    xfbml: true
   });
  };
  (function () {
   var e = document.createElement('script'); e.async = true;
   e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
   document.getElementById('fb-root').appendChild(e);
  } ());
 </script>

Can someone give me a working example using new javascript API with a multi-friend-selector?


回答1:


I couldn't get it working with the new JS API so I am using the old JS API for the multi friend selector and the new one for everything else. It's annoying but according to their developer roadmap some new friend request features (hopefully an API call) will be released in June. I plan on creating my own invite widget at that point.



来源:https://stackoverflow.com/questions/2886826/facebook-multi-friend-selector-new-javascript-api-broken

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!