I've created a very simple page. It pretty much just dumps out some html with the text "Hello, Facebook". This view can be found at:
http://www.fireflie.com/facebook/
For some odd reason, when I hit the view directly it prints out the text without any problem. I can do a GET or POST request and get the same results. However, when I view the Facebook app -- it shows nothing. It's just blank. On the contrary, if I point it at other URLs which actually have some real functionality and aren't CSRF Excempt -- then they show the error page. But it's still some type of output.
I've used Google Chrome and Firebug to try to see the response object from my site. It looks like only the headers are being returned. Am I missing something obvious? haha
Here's the tiny little view that I'm using:
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt, csrf_protect
@csrf_exempt
def facebook(request):
body = """
<html>
<head><title>Fireflie on Facebook</title></head>
<body>Hello, Facebook!</body>
</html>
"""
return HttpResponse(body)
I looked through my nginx logs and saw these lines which are kind of weird:
24.210.144.32 - fireflie [15/Jun/2012:17:09:34 +0000] "POST /facebook/ HTTP/1.1" 200 31 "
http://apps.facebook.com/fireflietest/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19"
24.210.144.32 - - [15/Jun/2012:17:09:50 +0000] "-" 400 0 "-" "-"
24.210.144.32 - - [15/Jun/2012:17:09:50 +0000] "-" 400 0 "-" "-"
24.210.144.32 - - [15/Jun/2012:17:09:50 +0000] "-" 400 0 "-" "-"
24.210.144.32 - - [15/Jun/2012:17:09:50 +0000] "-" 400 0 "-" "-"
24.210.144.32 - - [15/Jun/2012:17:09:50 +0000] "-" 400 0 "-" "-"
24.210.144.32 - fireflie [15/Jun/2012:17:10:05 +0000] "GET /facebook/ HTTP/1.1" 200 111 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.19 (KHTML, like Gecko) Ubuntu/12.04 Chromium/18.0.1025.151 Chrome/18.0.1025.151 Safari/535.19"
The first several lines are from my connection attempt using Facebook. The last line is directly hitting the server. In this particular case I did use two different browsers but I've tried it every browser I have.
I'm up for any ideas people might have on debugging this problem. Thanks!