1

I would like to know how to write python code for fetching the likes, comments, etc. on a post of Facebook posts. I am using the pyfacebook interface but when I run some code using this in python it gives me an error:

Traceback (most recent call last):
  File "ts.py", line 2, in <module>
    import facebook
  File "build/bdist.linux-i686/egg/facebook/__init__.py", line 58, in <module>
ImportError: No module named django.conf

2 Answers 2

1

You can try facebook-sdk, follow the example, you can get anything you want in the Facebook Graph API.

Sign up to request clarification or add additional context in comments.

Comments

0

You need to have a web framework called Django installed on your system to use pyfacebook.

However: it appears that Python is viewed by some to be the wrong tool for the job, noting that;

if you’re not in PHP, you’re already a half-step behind. It looks like the PHP libraries + integration are pretty good, well tested, well documented, etc.

As well as:

[the] pyfacebook tutorial is really a django tutorial.

You may want to look into installing Django, and starting from there. I would recommend not straying from the official Django tutorial, as it is a very good one.

1 Comment

i am getting same error after installing django aswell..i just want to fetch the likes,comment made by my friends on my post, its related to my project ...so if u have any python code or php code prefrebly python,plz give

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.