API错误代码102:带有php的javascript对话框 [英] API Error Code 102 : javascript dialogs with php

查看:107
本文介绍了API错误代码102:带有php的javascript对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

API错误代码:102 API错误描述:会话密钥无效或不再有效 错误消息:必须使用会话密钥调用iframe对话框

API Error Code: 102 API Error Description: Session key invalid or no longer valid Error Message: Iframe dialogs must be called with a session key

当我调用fb对话框发布到我的新应用程序中的朋友墙上时,我得到了一条有趣的消息.相同的代码适用于其他应用程序.这突然停止工作了.当我特别不设置if​​rame时,现在弹出一个奇怪的弹出窗口.当浏览器阻止弹出窗口时,它不会出现.

I get this funny message when calling a fb dialog to post to a friends wall in my new app. The same code is working for other apps. This suddenly stopped working. When i specifically dont set iframe, a weird pop up now pops up now. As browsers block pop ups it doesnt turn up.

即使在用户允许的情况下,直接自动发布也不起作用.我的应用程序也不受限制.有人有什么主意吗?

Also auto posting directly is not working even when user permits. My app is not unresricted also. Any one has any idea ??

推荐答案

在没有用户交互的情况下调用对话框时,出现了此错误.例如,当文档就绪"和"FB js-sdk加载事件"均被触发时.当我在同一页面上调用具有相同功能,参数的对话框,但在用户单击鼠标时做出反应-它起作用.

I've had this error, when calling dialog without user interaction. For example when both 'document ready' and 'FB js-sdk loaded events' are fired. When i called the dialog with same function, parameters, on same page but in reaction on user mouse click - it worked.

如果这与您所拥有的相似,则是解决方法:

If this is similiar to what you have, here is the solution:

FB.getLoginStatus(function(response) {
    if (response.authResponse) {
        //call dialog here
    }
});

这篇关于API错误代码102:带有php的javascript对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆