Forums

Can't import facebook module, need help, please!!

I'm new to pythn anywhere, and i just want to run a script for 24 hours, but everytime i try it, it gives me a error while trying to import the facebook module.

Traceback (most recent call last):
      File "/home/jorgecosta/happy_birthday.py", line 1, in <module>
      import facebook
ImportError: No module named 'facebook'

i have the code as:

import facebook
import datetime
import time
import sys

You probably need to install the Facebook library with pip

+1 to what rcs1000 says. The only facebook modules are have are the facebook-sdk version 1.0 for Python 2.7. This help page explains how you can install the module for yourself if you want to use it with a different version of Python, or if you want to upgrade to a newer version (it looks like 2.0.0 is available now).