Facebook iOS Mobile Web JS SDK Error

后端 未结 2 1601
悲哀的现实
悲哀的现实 2021-01-21 11:26

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:

2条回答
  •  独厮守ぢ
    2021-01-21 12:00

    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] Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings.  It must match the Website URL or Canvas URL, or the domain must be a subdomain of one o
    

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

提交回复
热议问题