Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat do I have to do to get Fandjango to work?
    primarykey
    data
    text
    <p><a href="https://github.com/jgorset/fandjango" rel="nofollow">Fandjango</a> (a Facebook Graph API wrapper for Django) looks great, so I pip install it and I'm off and running or so I think. I try and replicate the basic example given in the <a href="https://github.com/jgorset/fandjango/blob/master/README.rst" rel="nofollow">readme</a>. Well, I get an error there saying that I don't have some settings in my settings.py that aren't mentioned in any of the <a href="http://fandjango.readthedocs.org/en/latest/index.html" rel="nofollow">pydjango documentation</a> that I can find, so I do a little digging and find out about <a href="https://github.com/jgorset/fandjango-example" rel="nofollow">fandjango-example</a>.</p> <p>This seems to be reasonably up to date, so I take the advice dispensed at that page and add some settings to my settings.py:</p> <pre><code>FACEBOOK_APPLICATION_ID = 181259711925270 FACEBOOK_APPLICATION_SECRET_KEY = '214e4cb484c28c35f18a70a3d735999b' FACEBOOK_APPLICATION_NAMESPACE = 'myapp' MIDDLEWARE_CLASSES = [ 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'fandjango.middleware.FacebookMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ] </code></pre> <p>Unfortunately, that's giving me a new error:</p> <pre><code>ImproperlyConfigured: Error importing middleware facebook.djangofb: "No module named facebook.djangofb" </code></pre> <p>Some more googling, and I see people asking whether pyfacebook is installed. I look into my "pip freeze" and don't find it, so I go and get it from github:</p> <pre><code>pip install git+git://github.com/sciyoshi/pyfacebook.git </code></pre> <p>But now I suspect that I'm referencing the wrong facebook object because I'm getting:</p> <pre><code>'Facebook' object has no attribute 'user' </code></pre> <p>So, where did I go wrong?</p> <p>I'm running Python 2.6 on OS X with </p> <pre><code>Django==1.3.1 South==0.7.3 certifi==0.0.6 distribute==0.6.19 facepy==0.6.4 fandjango==4.0.2 nose==1.1.2 pyfacebook==1.0a2 # will probably kill this requests==0.8.9 wsgiref==0.1.2 </code></pre> <p>(and I also tested it on an AWS Ubuntu micro-instance, same results)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload