开发者

Can I embed my own page in a facebook app?

I want to embed a store locator in Facebook the way footlocker does.

Is it possible to just make a facebook app that serves my stand-alone store-locator page without having to re-write my st开发者_C百科ore-locator page for facebook?

Any good guides/how-tos for serving a stand-alone page through a facebook app like this?


This is very common and easy to do. All you have to do is create a facebook application and point your "canvas url" to your store locator page. So for example, if your store locator is www.example.com/storelocator set your Facebook application's canvas url to that page. If you look at that footlocker app you can see that the url of the iframe is actually http://unlocked.footlocker.com/main_store_locator/


If I understand you correctly, you are looking for the canvas guide. According to the documentation you can show your page in an iframe inside a tab on your facebook page.


Unfortunately, no. When you add a FBML/iframe app to your Facebook page, Facebook loads the content, caches it, and injects it into the DOM; it does not actually load it in an iframe. As such, there are restrictions about which elements can be included (eg, only <body> content), how Javascript is used (external libraries require some tweaking), and any element that references an external source (eg, Flash loading content) must have the target domain whitelisted for your application. In short: it's a pain, but it can be done.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜