Facebook iOS Mobile Web JS SDK错误 [英] Facebook iOS Mobile Web JS SDK Error

查看:150
本文介绍了Facebook iOS Mobile Web JS SDK错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经让Facebook在我们的主桌面应用上运行而没有任何问题。当我向移动网站添加相同的设置代码时,我收到了来自JavaScript SDK的错误:

We already have Facebook working on our main desktop app without an issue. When I added the same setup code to our mobile site I received an error from the JavaScript SDK:

从https收到类型为object的消息:/ /s-static.ak.facebook.com,期望一个字符串

然后,我从这里将设置代码更改为一个精确的副本: https://developers.facebook.com/docs/guides/mobile/web/并收到完全相同的消息。

Then, I changed the setup code to an exact replica from here: https://developers.facebook.com/docs/guides/mobile/web/ and received the exact same message.

此错误仅在Chrome开发人员工具或iOS模拟器中显示用户代理为iOS或Android时。当它从桌面运行时,我们没有看到这个错误。

This error only shows when the user-agent is iOS or Android in Chrome Developer Tools or in the iOS Simulator. When it's running from the desktop, we aren't seeing this error.

知道这里发生了什么吗?

Any idea what's going on here?

谢谢:)

推荐答案

我遇到了同样的错误。这不一定是你得到它的原因,但我最终看到我的iphone模拟器收到的数据包,这是来自s-statick.ak的错误:

I had the same error. This isn't necessarily the reason you're getting it, but I ended up looking at the packets being received by my iphone simulator, and here's the error from s-statick.ak:

[truncated] <span>Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App&#039;s settings.  It must match the Website URL or Canvas URL, or the domain must be a subdomain of one o

For我,错误是在我的设备上,我通过IP地址(192.168.xx等)访问该网站,并在本地开发我有主机路由localhost到我的Facebook应用程序配置中的网址..所以没有为应用程序配置IP。

For me, the error is that on my device(s), I'm accessing the site through an ip address (192.168.xx etc) and on local development I have hosts routing localhost to a url that is in my facebook app config... so the IP isn't configured for the app.

Facebook不会让我使用IP地址,因此似乎唯一的选择是测试部署或DNS服务器。希望这会帮助你。

Facebook won't let me use an IP address, so it seems like the only option is a test deploy or a DNS server. Hope this helps you out.

这篇关于Facebook iOS Mobile Web JS SDK错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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