2

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.

  1. Maybe Facebook is trying to pre-parse the request and then serve it as described here?
  2. Maybe Facebook has an undocumented load time limit on requests from the <head>?
  3. 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.

4

1 回答 1

0

如果这些疯狂的作品能够进入即使是一个陷入最前沿的 Heroku 开发和冷漠的 Facebook 支持之间的绝望泥潭的可怜灵魂的眼睛,那么我在这个地球上的时间将得到充​​分利用。我不会提供任何关于为什么这可以解决问题的理论,但这是我现在所知道的。

在此请求路径中的某处,响应被任意截断字节或字符。

Facebook canvas app >> Zerigo DNS add-on >> Cedar Stack / Gunicorn >> Django

我通过用古腾堡项目中的文本替换我的应用程序的全部内容来确认这一点——果然,每次响应都会偶尔在相同的字符处被截断。

剪掉 Zerigo 并将 Facebook 画布应用程序直接指向 heroku 上的应用程序地址(e.g http://quotewars.herokuapp.com/)似乎已经解决了这个问题。

于 2012-02-17T05:52:16.717 回答