OK, I was working on my Driving Local Traffic project, which includes the hosting of Facebook mini-websites, and I wanted to make the whole thing work solely using Amazon Cloudfront with S3-sourced files, without having to host a proxy or having to buy an SSL certificate. Well, I've found the solution!
No doubt you've encountered the problem that Facebook uses a POST instead of a GET command to retrieve the iFrame source, which results in Cloudfront throwing errors. It took me a while to figure out the fix, but I'll save you the time and cut to the chase!
Note that I did NOT want to have to host my own proxy like is suggested as the solution by many. How I fixed the problem was to use bit.ly to shorten the secure Cloudfront URL! I did some testing and found that bit.ly WILL do a 301 Redirect when you POST to the shortened URL.
However, whenever I tried to use my bit.ly URL in the Facebook Canvas URL field my app, I first got the following error:
"Canvas URL must point to a directory (i.e., end with a '/' or a dynamic page (i.e., have a '?' somewhere)."
Simple fix! bit.ly doesn't mind at all if you append a ? to the end of the URL!
However, I then started getting the dreaded Facebook error:
"Error There was a problem saving your changes. Please try again later."
That one took a while to solve, but finally a hint got it working: adding the port number to the URL solved the issue!
I didn't test many other URL shorteners, but I know that goo.gl does NOT work. It throws a "Method Not Allowed" response to the POST. If anyone tests other url shorteners, please leave your findings in the comments below!
Please take a look at my video about Local Search at https://drivinglocaltraffic.com. In it, I describe how a local business can appear on the first page of Google, Bing and Yahoo! without a website and without paying for ads! Let me know what you think about it by leaving a comment below the video and sharing it with your local business-owning friends and family.