I have downloaded the Facebook SDK from:
In my Python install folder, I created a folder called fb and extracted the files from GitHub into this folder. I then ran:
setup.py install
To install the module. However, when I try and run
from facebook import Facebook
in the Python Shell I get the following:
>>> from facebook import Facebook
Traceback (most recent call last):
File pyshell#0, line 1, in
from facebook import Facebook
ImportError: cannot import name Facebook
However when I simply write from facebook import *, I receive no errors.
What step haven’t I taken to get this working correctly? Thanks
It looks like you’re doing everything correctly – your problem is that there isn’t a
Facebookobject inside of thefacebookmodule (see the code here). The reason the*import works is because that is the syntax to import all names. From your code, you should be able to simply usefacebook.<your_method>to call what you want.