Remove the default facebook api key from the demo.

This app has apparently been deactivated by facebook.

Closes #1132.
This commit is contained in:
Ben Darnell 2014-08-24 11:50:47 -04:00
parent 1e1d61abbd
commit 7d3f710e81
2 changed files with 12 additions and 10 deletions

View File

@ -1,8 +1,9 @@
Running the Tornado Facebook example
=====================================
To work with the provided Facebook api key, this example must be
accessed at http://localhost:8888/ to match the Connect URL set in the
example application.
====================================
To use any other domain, a new Facebook application must be registered
with a Connect URL set to that domain.
To run this example, you must register a Facebook application with a
Connect URL set to the domain the this demo will be running on
(i.e. http://localhost:8888/ by default). The API key and secret
for this application must be passed on the command line:
python facebook.py --facebook_api_key=ABC --facebook_secret=XYZ

View File

@ -25,10 +25,8 @@ import tornado.web
from tornado.options import define, options
define("port", default=8888, help="run on the given port", type=int)
define("facebook_api_key", help="your Facebook application API key",
default="9e2ada1b462142c4dfcc8e894ea1e37c")
define("facebook_secret", help="your Facebook application secret",
default="32fc6114554e3c53d5952594510021e2")
define("facebook_api_key", help="your Facebook application API key", type=str)
define("facebook_secret", help="your Facebook application secret", type=str)
class Application(tornado.web.Application):
@ -113,6 +111,9 @@ class PostModule(tornado.web.UIModule):
def main():
tornado.options.parse_command_line()
if not (options.facebook_api_key and options.facebook_secret):
print("--facebook_api_key and --facebook_secret must be set")
return
http_server = tornado.httpserver.HTTPServer(Application())
http_server.listen(options.port)
tornado.ioloop.IOLoop.instance().start()