Facebook deleted their Python SDK repository without warning
techhouse.org
techhouse.org
My short response is that the repository is public once again, with a notice that it is deprecated. I personally apology for the churn.
My long response is that we haven't supported this SDK for some time and with our recent move to OAuth 2.0 across the board, the SDK does not support the latest cookie format. The reason we made the repository private was to avoid confusing developers with a public SDK that just didn't work and that we already said we didn't support.
You may be wondering why we don't support this SDK. The answer is very simple, resources. What we have been doing all year is reduce the surface area of our platform to a place that we can actual provide good support. This is the reason that we are removing FBML (https://developers.facebook.com/blog/post/568/), deprecating the REST API (https://developers.facebook.com/blog/post/616/), moving to support OAuth 2.0/HTTPs (https://developers.facebook.com/docs/oauth2-https-migration/) across the board and deciding what SDKs we are really going to support.
Based on this, we are going to do two things. First, we have made the repository public again, with messages that it is now deprecated. Feel free to clone and mod to taste/work. We really want to support a Python SDK, but we need to get all our resources focused on the SDKs we can actually support well. I have no doubt that the developer community can and will provide an SDK to fill this need in the interim. Second, we are going to post something on our developer blog to make sure everyone is clear about what SDKs we support (at this time we are only supporting the PHP SDK, the Javascript SDK, the iOS SDK and the Android SDK).
If I visit with my normal useragent I get a log-in form. If I visit with the Googlebot useragent I get content.
I like this idea. The FB API is a mess that I've decided to stay away from. If they consolidate their resources, improve the API and provide good docs, I'd be willing to revisit.
FriendFeed, acquired by Facebook in 2009, was a Python shop. These guys now maintain their Tornado platform as Facebook (https://github.com/facebook/tornado). Facebook's CTO, Bret Taylor, is a Python guy (https://github.com/finiteloop). Python is used in house. They have the resources to support Python. They've just made the business decision not to.
Having Python experts on staff is no indication that those people have time to work on additional Python projects. And if there is a real talent shortage, it is quite likely they cannot find anyone else to take on the extra projects.
Ultimately, you are right that it is a business decision. They could hire anyone off the street and train them to be skilled in Python. Though I understand why they might not want to do that.
From that position, the open source community, or any enterprising developer for that matter, has a single, standard, and well supported API they can then write a language specific library for and maintain.
Like I say, I'm not privy to all the details behind this, and I'm being wilfully ignorant, but it intrigues me that the developer of an API feels that it needs to then support its own abstraction of it for a limited number of platforms/languages.
They could probably easily hire a Python coder to maintain a Python API (and Ruby, or whatever language), but it would be unrelated to the main work they're doing and probably lag behind since those languages are either little used or not used at all in house.
Python is used in house. They have the resources to support Python. They've just made the business decision not to.
This isn't just to prevent getting caught with your paints down when a developer deletes a repo from a hard-coded URL. PyPI itself is known to go down more than [insert NSFW comment here]. You can either keep a local hard-copy of dependencies in your repo (ugly), or run an internal PyPI server using something like Chishop (which is now called djangopypi) [1].
Best-practices rant aside, thanks lincolnq for providing a backup fork of the project. And thanks Facebook for deleting a resource that developers have become reliant on without any notice whatsoever. Although that really shouldn't come as a surprise to anyone that's had the displeasure of using their excuse for an API.
I personally just keep a modified version of this fork in my repository.
https://github.com/liorsion/python-sdk/
A note on DjangoPyPI and PyPI in general. I think it's about time we have a feature complete, stable, alternate PyPI implementation now. I tried virtually all the PyPI implementations out there a couple months ago and eventually had to settle with DjangoPyPI very reluctantly. It has trouble sitting behind a proxy and deleting things. In short, it's a mess, but it's the best in terms of features supported out there right now. It's a sad state of affairs, but Python should, and can do better than this. There's no way we can't have something like Maven or RubyGems.
"""This is pretty lame, apparently it was really out of date and we're having trouble finding the resources internally to support it.
For now we're pointing people here: https://github.com/pythonforfacebook/facebook-sdk """
Although I think the sudden disappearance wasn't a smooth move, I guess the community will have to step up and maintain the library. Nothing wrong with that, it was open source to begin with.
I don't think you'll get much community support behind maintaining an API which relies on their URL-based APIs unless the people involved really, really need this functionality. The mess Facebook has created with their APIs makes this a very non-fun itch to scratch for its own sake.
https://us.pycon.org/2012/sponsors/#sponsor-89
I have nothing but contempt for Facebook at this point. As a user I don't trust them, and as a developer I can't stand them.
There's no reason why Facebook, with their size and engineering talent, shouldn't be able to allocate the resources to maintain their Python SDK. Making it the 20% project of a single engineer would be enough, I should think, with a few extra hours thrown in when major API changes come through. Even if they let the community drive the bulk of development, they really can't spare a few hours a week to look over bug reports and pull requests?
It's easy to write a check, but I'd like to see them take some real action and make Python a first-class citizen for Facebook app development.
Take a look at all the different repos they have on their github page, along with projects like HipHop-PHP, Cassandra, Tornado and the thousands of commits they have contributed to MySQL, PHP, memcached, Varnish. Let alone the number of sites they integrate with and their active user base, Facebook's engineers are quite intelligent and have solved some amazing problems. I'd like to think that most of HN thinks like engineers and marketers, positions that generally do best when their time isn't wasted by flinging mud for political "gain". Please keep it that way.
"Just delete it."
EDIT - Relevant HN link: http://news.ycombinator.com/item?id=2737965
It's surprising how little known these things are - compared to e.g. Ruby Gems, CPAN, CTAN, CRAN and npm.
There's a few command-line programs to access it from, the most popular right now being "pip".
In general, you should mirror external dependencies to the extent you're risk-averse. Mildly paranoid startup? Fork any github repos that might disappear and that don't already have forks you trust. Running a large financial institution? Run your own gem server, apt repo, etc.
I suppose this is one of the great advantages of CPAN being developed in the era of modem based internet :)
This is the only significant change: https://github.com/sjuxax/python-sdk/commit/9aa42acaef53a7f5... , to fix crashes when handling profile picture downloads. It's hackish but it was all I needed for my project so I rolled with it.
This version of the library installs as sjuxax-facebook. I'm not sure if it still works, I haven't tried to use it since October.