facebook api using python
-
01-07-2021 - |
Question
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
No correct solution
OTHER TIPS
You can try facebook-sdk, follow the example, you can get anything you want in the Facebook Graph API.
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.