Problem launching Heroku Facebook tutorial with Python

I am testing Heroku's ability to write a Facebook application with Python. I had a problem running the main tutorial. This question seemed to be worth talking about StackOverflow in case of an answer that helps other people facing the same problem.

I followed the instructions on the heroku game development page (http://devcenter.heroku.com/articles/facebook). Heroku deployment worked great.

However, when you start the application locally, no. When I follow the instructions and raise

http://localhost:5000

I hit the Facebook login screen. But when I click "Login" on this screen, I get:

SSL connection error. Unable to make a secure connection to the server. This may be a server problem, or you may need a certificate of authenticity for a client that you do not have. Error 107 (net :: ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

and the console output is

09:55:07 web.1 | https://localhost:5000/  09:55:07 web.1 |
https://www.facebook.com/dialog/oauth?client_id=179852202088814&redirect_uri=https://localhost:5000/&scope=user_likes,user_photos,user_photo_video_tags
09:55:07 web.1 | 127.0.0.1 - - [24/Sep/2011 09:55:07] "GET / HTTP/1.1"
302 -  09:59:02 web.1 | 127.0.0.1 - - [24/Sep/2011 09:59:02] code 400,
message Bad request syntax
 ('\x16\x03\x00\x00U\x01\x00\x00Q\x03\x00N}\xe2&\xf9\xf7"\x15\xd5\xb6\xf6\xa6\x0f\xb01\x97N\xcc\xb3l\xed\x97\xd1!-\x91c?\x1f\xac\xa2h\x00\x00*\x00\xff\x00\x88\x00\x87\x009\x008\x00\x84\x005\x00E\x00D\x00f\x003\x002\x00\x96\x00A\x00\x04\x00\x05\x00/\x00\x16\x00\x13\xfe\xff\x00')
09:59:02 web.1 | 127.0.0.1 - - [24/Sep/2011 09:59:02]
"UQN}?&??"ն??1?N̳l??!-?c???h*???98?5EDf32?A/??" 400 -

When I try to use it in Safari, the address bar shows the following very long URL:

https://localhost:5000/?code=AQBPWpkbRdL2bt7KER0fcUS9ZnheXiGApkaF5MXbNgyIJqzw46SGve1iVyLIx1sDltNh0PkXPDdxhjAxoa1YED1cpcaflCXCkqzO27A-rhgjBpXwWUClpGRpRmDD2eIXcOyIczo_qGf45tbpvDZO5hFa0gmUeSHri4vY3bqw-5jBjZRoZfEB7pI8cLPOIsnNICI#_=_

Safari claims that it cannot establish a secure connection.

This works on OS X 10.6.8.

+5
source share
1 answer

, https , SSL . , :

def get_home():
    return 'http://' + request.host + '/'
+6

All Articles