Dear All,

I'm trying to use the facebook-sdk for python [1]. I'm asking here and
not on the SDK groups, because I think this is a basic beginner's
question, not directly related to the framework.

I installed facebook-sdk:
        virtualenv .
        source bin/activate
        pip install facebook-sdk
        pip install requests

and I'm trying to use it now:

        #!/usr/bin/python
        from facebook import Facebook
        token = 'xxx'
        graph = facebook.GraphAPI(token)
        profile = graph.get_object("me")
        friends = graph.get_connections("me", "friends")
        friend_list = [friend['name'] for friend in friends['data']]
        print friend_list

but I'm getting the following error:

        (facebook)[chris@cd facebook]$ ./fb1.py
        Traceback (most recent call last):
          File "./fb1.py", line 3, in <module>
            from facebook import Facebook
        ImportError: No module named facebook

facebook.py is in:

        ./lib/python2.6/site-packages/facebook.py

Thank you in advance.


[1] https://github.com/pythonforfacebook/facebook-sdk

-- 
Christian
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to