I've built a Facebook application which should be available on the web or as a canvas application within Facebook. My setup is like so:
SERVER | FACEBOOK APP | CURRENTLY WORKS
-----------------------------------------------------------------------------
localhost | quotewarsdev | both in app and directly
-----------------------------------------------------------------------------
quotewars2012.com | quote_wars | only by accessing directly
I've developed and deployed other Facebook apps using the same set up with no problems. Bizarrely, 90% of the requests for the production app in Facebook fail- the app loads most of the contents of <head>
and then craps out. Occasionally the full page will load.
A Django app running on the cedar stack on Heroku- I know, not really production ready - but I don't think this is the culprit as the app loads fine outside of Facebook.
If I tail the server logs I can see the server sending CSS/JS assets up through the parts of the <head>
that Facebook has loaded.
- Maybe Facebook is trying to pre-parse the request and then serve it as described here?
- Maybe Facebook has an undocumented load time limit on requests from the
<head>
? - Maybe Facebook has an undocumented limit on number of request in the
<head>
?
None of these theories make sense given the a problem-free load from local.
Can anyone confirm any of the above or offer any other ideas?
Meanwhile, with no indication of an error in the server logs, no error reports in the Facebook app interface, and no hint of any problems in the browser, I'm left randomly removing, reordering, and futzing with <head>
tag to debug this.