FB.UI method: send display : 'popup' keeps looping in IE

南楼画角 提交于 2019-12-11 15:19:07

问题


I have facebook iFrame app which is being displayed in company page. On same iframe app i have invite button where we open FB.UI send method to open invitation dialog.

For some reason since last week, my send window is not getting closed. I used fiddler to see what is happening and noticed that following following URL keeps looping. This happens only in IE, works fine in all other browsers.

https://s-static.ak.fbcdn.net/connect/xd_proxy.php?version=3#cb=f352b316971395&origin=http%3A%2F%2Fqa.xxxx.local%2Ff281b26d528cc6&relation=opener&transport=flash

here is my code:

<div id="fb-root">  </div>
<script type="text/javascript" src="http://connect.facebook.net/en_GB/all.js"></script>
<div class="footer">
    <br />
    <script type="text/javascript">
        FB.init({
            appId: '<%=lAppId %>',
            status: true, // check login status
            cookie: true, // enable cookies to allow the server to access the session
            xfbml: true  // parse XFBML
        });

    </script>
</div>

I am calling following javascript on click on Invite button:

function invite() {
        var lLinkToPublish=GeAppUrl();
        var lTextToPublish=GetPublishText();
        var lTitleText=GetInvitationTitle();
       FB.ui({
              method: 'send',
              name: lTitleText,
              display: 'popup',
              description: lTextToPublish,
              link: lLinkToPublish ,
              });


    }

I have tried solutions from for e.g. with no luck Facebook php app keeps looping in IE, is there a fix on server side?


回答1:


Figured it out myself, posting it here so that can help others facing similar issue.

Reason was:

1) Send popup is always opened with HTTPS and i was using http://connect.facebook.net/en_GB/all.js for connect API, I had to replace HTTP with HTTPS

2) I was using server control to call FB.UI method. I had to replace it with plain html Input control.

Hope this helps.

-Imran



来源:https://stackoverflow.com/questions/7322397/fb-ui-method-send-display-popup-keeps-looping-in-ie

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