Trying to figure out how a Google map pops up inside Facebook

Here's the deal: I have an fb application that I wrote mostly for myself. (you can play with him http://apps.facebook.com/bicyclelog/log.php?uid=0 if you want ...)

In any case, the problem is this: Facebook lobotomizes Javascript. Google Maps is based on Javascript. Therefore, I have to put the card in an iFrame. But FB sets limits on iFrames, so I basically have to open a new page to display the map.

However, I would really like a map to appear instead. Ideally, it would look like other FB dialogs ...

Can anyone suggest an approach? I am a good encoder for C drivers and devices, but my PHP skills are at the stage of the cargo cult ....

+3
source share
1 answer

You can put fb: iframe inside the FBJS dialog box and direct src to a page without authentication on your server (using your callback address, not apps.facebook.com/blah) that displays the map.

This will probably give you the same problems you encountered when using iframes, but this is really the only option due to the way FB handles JavaScript.

+3
source

Source: https://habr.com/ru/post/1709930/


All Articles