2012-09-10 69 views
1

我想知道如何編寫python代碼來獲取Facebook帖子上的喜歡,評論等。我現在用的是pyfacebook接口,但是當我在Python運行使用這樣的代碼它給我一個錯誤:使用python的facebook api

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 

回答

0

你需要有一個名爲的Django安裝在系統上使用pyfacebook一個Web框架。

但是:看起來有些人認爲Python是wrong tool for the job,注意到這一點;

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.

除了:

[the] pyfacebook tutorial is really a django tutorial.

你可能想看看installing Django,並從那裏開始。我會推薦而不是偏離官方的Django教程,因爲它是一個很好的教程。

+0

安裝django後,我得到同樣的錯誤..我只是想獲取喜歡,我的朋友在我的帖子上發表的評論,它與我的項目有關...所以如果你有任何python代碼或php代碼prefrebly蟒蛇,PLZ給 – user1543087