I have downloaded the Facebook SDK from:
https://github.com/pythonforfacebook/facebook-sdk/
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 Facebook object inside of the facebook module (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 use facebook.<your_method> to call what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With