summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2011-03-19 21:52:22 +0200
committerYuval Adam <yuv.adm@gmail.com>2011-03-19 21:52:22 +0200
commitdf5544cfe638bc2246f6821e6089dec7c1ad2494 (patch)
tree0d5a3403ff1a023820367e741c5d031f98532f58 /fb
parentdfe1bbadf614715bab1b28c0e03f05af5a145111 (diff)
key propogation almost working
Diffstat (limited to 'fb')
-rw-r--r--fb/context_processors.py5
-rw-r--r--fb/middleware.py5
-rw-r--r--fb/templates/fb_js.html10
3 files changed, 20 insertions, 0 deletions
diff --git a/fb/context_processors.py b/fb/context_processors.py
new file mode 100644
index 0000000..92a9a0a
--- /dev/null
+++ b/fb/context_processors.py
@@ -0,0 +1,5 @@
+from django.conf import settings
+
+def fb_app_id(request):
+ print 'bla'
+ return { settings.FACEBOOK_APP_ID } \ No newline at end of file
diff --git a/fb/middleware.py b/fb/middleware.py
new file mode 100644
index 0000000..cd2305d
--- /dev/null
+++ b/fb/middleware.py
@@ -0,0 +1,5 @@
+
+class DjangoFacebookMiddleware:
+
+ def process_template_response(self, req, res):
+ \ No newline at end of file
diff --git a/fb/templates/fb_js.html b/fb/templates/fb_js.html
new file mode 100644
index 0000000..11969d2
--- /dev/null
+++ b/fb/templates/fb_js.html
@@ -0,0 +1,10 @@
+<div id="fb-root"></div>
+<script src="http://connect.facebook.net/en_US/all.js"></script>
+<script>
+ FB.init({
+ appId : '{{ FACEBOOK_APP_ID }}',
+ status : true, // check login status
+ cookie : true, // enable cookies to allow the server to access the session
+ xfbml : true // parse XFBML
+ });
+</script> \ No newline at end of file