DISQUS

Scripting News: How to get started with Facebook's new API? (Scripting News)

  • evansolomon · 8 months ago
    As convenient as it would be for lots of people (including myself) to have Facebook's API mirror Twitter's, it is an extremely tough thing to do. Facebook's API is WAY more complicated (and powerful) than Twitter's.

    More importantly, Facebook has probably 20-40x as many users as Twitter. I have no idea how many developers either platform has, but I would guess that far more developer hours have been spent on Facebook's API than Twitter's. If that's the case, Facebook would almost certainly be doing themselves a disservice by jumping through hoops to make their API follow Twitter's.
  • dave · 8 months ago
    I've heard that kind of thinking many times before, and there's a problem. These numbers aren't static.

    Microsoft said the same kind of stuff about MAPI and Blackbird when the Internet was booting up as a commercial platform. A few years later they were rushing to catch up with the API of the web (HTTP).

    Microsoft also said RSS wasn't important, they were working on more serious stuff, and of course they had an installed base in the billions of users, and RSS was just getting started (thousands of feeds at the time). Then a few years later they had "Team RSS" and were rebuilding everything around RSS.

    There's a tendency at bigco's to relax and enjoy they lead they have until they don't have it anymore. Then the question is why they blew it. The little guys *love* this about the big guys, btw. You can even tell them how to compete with you to win, and it doesn't matter. :-)
  • evansolomon · 8 months ago
    Couldn't you make the exact opposite case for way more failed companies? Were A&P and Safeway shortsighted for not copying Webvan? Petco for not copying pets.com?

    Obviously these are two of the most catastrophic web failures ever, but certainly not every up and coming company holds the secret to taking down the big guys.

    The Microsoft/internet point is a fair one. And I'm not as familiar with the RSS saga as you, but I'm willing to believe you're more or less correct there as well. Those have got to be the exceptions rather than the rules though. Even if Twitter is really the next BIG thing, I don't think it's at all clear that Facebook won't be as well, or that there's any more velocity to the (admittedly) non-static developer population of Twitter than Facebook.
  • dave · 8 months ago
    APIs are a whole different thing. You have to get competing businesses to
    trust you. Every developer knows that if they're successful enough the day
    will come that the platform vendor will eat their lunch. What you hope is
    that there is something in it for you too. It's a seduction, as with all
    seductions, the first step has to be easy and look pleasurable, and you have
    to get the idea that you migth not get eaten right away. :-)
  • dave · 8 months ago
    Also numbers of developers are mostly irrelevant. Developers isn't a game of numbers. You need the killer app. Then the others will follow.
  • davemerwin · 8 months ago
    Do you think this will allow people who create Twitter apps to include FB publishing as well? It looks like Nambu is heading in that direction.
  • dave · 8 months ago
    Yes, I think so.

    If you're motivated and in a competitive market, I don't see how you could
    pass this up.

    Me, I'm a dabbler and experimenter, with a lot of demands on my time a lot
    of different ways I could go.

    If they had something easy to try out, I probably would have tossed my
    project for the day and dug in. But it would take me a week to get Hello
    World working. And it wouldn't be a fun week. For the desktop client guys
    this is a must-do thing, anyone who doesn't do it might as well close up
    shop.
  • crabasa · 8 months ago
    I spent a weekend with a group of programmers trying to spin-up a proof of concept using Facebook Connect. By the end of the weekend we had virtually nothing, and I ended up presenting a demo using a bunch of static images and JQuery magic.

    The moral of the story is that developing on Facebook's platform is incredibly daunting, and I believe this has to do with their notion of "dynamic privacy". So, instead of simply sending data along a wire based on a request (REST), you have to deal with an elaborate web of hooks and callbacks. :(
  • sameasiteverwas · 8 months ago
    The moral of the story is that developing on Facebook's platform is incredibly daunting...


    This is true in my experience as well -- when I was actively developing for the Facebook platform, they actually had showstopping bugs in their official PHP client, something I literally have never seen before. It was like it went out the door without anyone bothering to test it.
  • dave · 8 months ago
    I wouldn't trust them then. What if you get your code running -- what are
    the chances they'll break you later? They'll say they didn't mean to and
    maybe they're telling the truth, but if your app is broken your users will
    blame you. Excuses don't matter.
  • David Recordon · 8 months ago
    One of the challenges I've run into using Facebook's API in the past is that in general if the library you're using doesn't support their latest API methods, it can be a bit tricky to get going. Take a look at http://wiki.developers.facebook.com/index.php/E... for more information on how to create an app that requests access to your stream. You should be able to ignore FQL and use their REST API instead. Take a look at http://wiki.developers.facebook.com/index.php/S..., though realize you'll need to hack on an existing FB library to make it easy. They also are using Activity Streams so you could request an Atom feed of a user's stream with more info at http://wiki.developers.facebook.com/index.php/U..., though you still need to construct the signature on the URL.

    And yes, they should duplicate the basics of Twitter's API to make things easier for developer's familiar with it who want to try out Facebook's.
  • dave · 8 months ago
    This moving target syndrome is a bad sign David. And the API should be simple enough that you don't need a toolkit.
  • David Recordon · 8 months ago
    Agreed, but Facebook has always had a history of changing their API back through when they launched Platform initially. Things are far more stable these days though, but still as you point out hard to get started.
  • dave · 8 months ago
    They should hire me to design a new API for devs who are just getting
    started. I see the data I want. Use OAuth to give apps access. It's so
    straightforward, lots of prior art.
  • cshotton · 8 months ago
    I purposefully avoided Facebook's "API" in its earlier incarnations because it was designed around their captive, walled-garden model of apps. The new API is allegedly less restrictive insofar as it *can* be baked into server-side apps and stand-alone applications. But damn if I can tell how to do it short of reverse-engineering a big pile of PHP code.

    I'm with Dave on this one. Document the set of APIs and show me some sample HTTP calls and payloads. I have no desire to wade into someone else's skanky PHP framework to do something which should be incredibly simple, like update my status on Facebook or get the RSS feed of new stories.

    Facebook wants to infiltrate existing sites by way of their authentication and statusing "APIs". They don't really seem to want a lot of external applications that could mask the Facebook brand or repurpose their data in ways they cannot control. I don't think getting access to the news stream is anything massively different than their previous API offerings as long as it comes with the baggage/koolaid that they seem to be requiring.

    p.s. Yes, I have never written a Facebook app. Today's news likely won't make me want to any more than before, unfortunately.
  • jamtoday · 8 months ago
    In this conversation, it's easy for us to forget that most people would prefer to have privacy over giving developers easy ways to add tons of value.

    Or at least, that's what they think. I know many people that have vented against any pro-developer changes Facebook makes. Reactionary, yes. But that's fraking life for you.

    I personally would like to see a Facebook API built for twitter devs, down to the same method names and everything. If there is a bunch of stale kool aid in the Facebook client, just keep it where I won't have to see it.
  • jonknee · 8 months ago
    Facebook's API is a lot more complicated than Twitter's because it does a lot more. For starters users actually use the app on Facebook, Twitter has nothing like that. The published tools are in PHP because that's what Facebook uses, but you can use whatever language you want. There's a bit of setup needed for each app because of this though, so read the getting started docs.

    If you just want to mess around, use the test console. It's easy as 1-2-3.

    http://developers.facebook.com/tools.php?api

    Otherwise, you should be able to easily send REST calls like anyone else.
  • • RoN™ • · 8 months ago
    I have a feeling these docs are written for developers who have been working with Facebook. I have never written any code to call Facebook's API.

    My Blogs:
    http://top-mobilephones.blogspot.com

    Subscribe:
    http://feedproxy.google.com/TopMobilePhones

    RoN™:
    http://www.jerome-sedurifa.tk