Forums

Is there any update in Facebook API?

My facebook application stop working. Please Please help me to start my application again. Day before yesterday it was working perfectly.

I am having same problem.My app also stop working. I am also looking for help. @ihtsham please let me know if you have fixed the problem or you know any other free python hosting.

The facebook API might have changed I guess. What errors are you guys experiencing? What's in the error log? What used to happen, and what happens now?

The Demo app on : http://blog.pythonanywhere.com/35/ giving the same error. This app was working before. On both app i am getting following error

Request Method: POST Request URL: https://moodiraja.pythonanywhere.com/?fb_source=search&ref=br_tf Django Version: 1.3.7 Exception Type: UnboundLocalError Exception Value:
local variable 'settings' referenced before assignment Exception Location: /usr/local/lib/python2.7/dist-packages/django_facebook/decorators.py in _view, line 42 Python Executable: /usr/local/bin/uwsgi

I think it's not a problem with facebook, it's more likely a bug that the Django4Facebook developers have introduced accidentally

In order to fix this, you'd want to revert back to an older version of django_facebook. The best way to do that will be to use a 'virtualenv'.

There are some instructions for how to use a virtualenv to upgrade to a particular version of Django here: https://www.pythonanywhere.com/wiki/VirtualEnvForNewerDjango

You would need to adapt these instructions to install a different version of django4facebook. Do you feel up to giving that a go?

A little more help:

You'll need to delete your old web app first. Don't worry, this won't delete your code. Then, when following the instructions, refer to your old wsgi file, which will be backed up in /var/www, when you set up your new web app, to get the sys.path bits right.

Once you have a virtualenv set up and activated, you'll want to do a pip install of a commit that's behind the breaking one in the history:

pip install https://github.com/pythonforfacebook/django-facebook/tarball/8b03ab2a706078377837728e99750ab1011e2c84

That will install django as well. Then you can try and reload your web app, and see how things look!

Looks like the developers may have fixed the bug -- and only minutes after I reported it!

You'll still need to follow the virtualenv instructions above, but now you can just do

pip install https://github.com/pythonforfacebook/django-facebook/tarball/master