TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Easy Facebook Scripting in Python

77 pointsby dananjaya86over 13 years ago

4 comments

samarudgeover 13 years ago
From the comments<p>&#62; i would like to work in PHP command line code<p>Just, just no. PHP has many uses, but the command line isn't one of them.<p>Also I don't think pulling in a script over HTTP is such a great idea, I know it was done for simplicity but why not tell people to download the script first and save it alongside their main script, then just use an 'import filename'.<p>Now what <i>would</i> be useful, and could probably justify pulling in a module from remote, is if it kept up with Facebook API changes.
scottmp10over 13 years ago
This, and previous FB APIs, seem to really be lacking. For a Python API, for instance, you shouldn't be calling generic 'graph' functions and then passing strings to tell it what to do. If you want to do that, you might as well just construct the URL yourself.<p>Python is powerful for hackers because of introspection. You can pull up a shell and all of the documentation is available with type() and dir() and iPython's tricks. An API that takes actions as strings fails for Python.
评论 #2966662 未加载
reviconover 13 years ago
I love this kind of post. Copy 4 lines of code and you're hacking away. Great job.
petsosover 13 years ago
The way he imports the module is just crazy. Just download the file and import it normally.
评论 #2966672 未加载