If you’re looking for a straight documentary about Mark Zuckerberg and the founding of Facebook, “The Social Network,” written by Adam Sorkin (“The West Wing”) and directed by David Fincher (“Fight Club”) isn’t it. But if you’re in the mood for a smart, literate, engrossing parable of genius, ambition, greed, treachery and inconclusive justice that says a good deal about a world undergoing technological revolution but still beset by the same old human problems, here it is.

The script is based on a book, “The Accidental Billionaires,” by Ben Mezrich, whose earlier tome “Bringing Down the House” was the source of the film “21,” about Harvard students recruited by a professor to make big bucks gambling in Vegas. That picture (and the source book) were highly fictionalized versions of actual events, and so are “Billionaires” and the screenplay Sorkin’s fashioned from it. “Network” is a far better film than “21,” but it’s equally slippery about the historical record, and it’s unfortunate that for most people, it will become what they know, or think they know, about Zuckerberg. But at least the impact in this case won’t be as damaging as what Oliver Stone perpetrated in “JFK,” for example. (Not that one should expect Zuckerberg to accept it with particularly good grace.)

Of course, he can always soothe his misgivings with his unimaginable wealth, and how he acquired it is what the picture is all about. In this telling, he’s a driven Harvard undergrad, a computer genius, who’s moved to create the design for what will emerge as Facebook by two humiliating events. One is being dumped by his girlfriend Elaine (Rooney Mara) following a machine-gun conversation in a bar during which he manages to insult everything about her—including the school she goes to (BU)—totally oblivious to her feelings or much else beside himself. That leads him not only to post nasty remarks about her on his blog, but overnight to invent Facemash, an Internet site that allows Harvard students to vote on which of two coeds whose photos are randomly selected is the hotter. Naturally the university brings him up on charges and he’s disciplined.

The second humiliation follows from the first. The notoriety of Facemash gets him the attention of a trio of moneyed seniors—twins (and rowing stars) Cameron and Tyler Winklevoss (both played by Armie Hammer, with an assist from a body double) and nerdy Divya Narendra (Max Minghella)—who seek his programming expertise in setting up a Harvard dating site they’ve been working on. He agrees, but miffed because he’s not been invited to join one of the exclusive “Finals” clubs they belong to, only pretends to be working on their site while creating his own—The Facebook—instead, with its modest capital costs covered by his closest friend, fellow student Eduardo Saverin (Andrew Garfield).

To be honest, these twin explanations for Zuckerberg’s conduct—neither of them exactly accurate from the “historical” standpoint, anyway—are rather thin conceits on which to base the point Sorkin wants to make—to draw an ironic contrast between a socially dysfunctional person and the revolutionary means of social networking that he creates but never really benefits from, except financially. The script briskly shuffles between scenes showing how Zuckerberg climbs to the top through a relationship with the Svengali-like figure of Sean Parker (Justin Timberlake), the rascally, hard-living inventor of Napster, shedding older associates along the way, with others dramatizing the depositions given in suits against him brought not only by the Winklevoss brothers and Narendra, by also by Saverin, who alleges he was defrauded of his part of the explosively successful operation by Zuckerberg and Parker. The defining moment of the whole unhappy process comes when Saverin mournfully confronts Zuckerberg with the accusation that by mistreating him, he’s lost his only real friend, however many people might be listed as such on his Facebook page.

So the film isn’t really designed as a biography at all. Instead it’s a sort of cautionary tale about how fragile and tenuous real friendships are, and how the very idea of friendship has been devalued in the modern conception of “socialization” that Zuckerberg and Facebook represent. It’s certainly a dark commentary on the nature of contemporary on-line “networking,” and one wonders how those addicted to—and emotionally dependent on—Facebook might react to the message. It’s also the case, from a purely dramatic point of view, that all the characters in the film are so unlikable that viewers could simply be turned off by them. (Harvard comes off pretty badly, too, seeming a den of arrogance and back-stabbing. In one sequence, even its president—Larry Summers, no less—is depicted in a very unflattering light.)

But Sorkin, Fincher and their cast and crew are so adept that they make spending time with Zuckerberg, Saverin, Parker and their associates fizzy fun. Sorkin provides reams of clever, stinging dialogue, and the cast delivers it with aplomb. Eisenberg is all keen-eyed, sharp-tongued intensity as Zuckerberg, yet conveying the neediness behind the prickly outside bravado. Garfield, by contrast, plays Saverin with a heart-on-sleeve directness that’s the perfect contrast to Zuckerberg’s chilly façade. Timberlake makes Parker a convincingly sleazy operator, and Hammer is the very model of jock snobbery as the Winklevoss duo. The smaller roles are expertly filled, with Mara standing out as the girl Zuckerberg loses, matching Eisenberg beautifully in that opening scene of verbal ping-pong.

Fincher, meanwhile, working closely with cinematographer Jeff Cronenweth and editors Angus Wall and Kirk Baxter, has everything moving at a sparkling pace, and keeps the convolutions of plot and argument clear without excessive technical flamboyance. The visuals are nicely complemented by the subtly compelling score of Trent Reznor and Atticus Ross.

The result is a film that may treat the biographical facts about Mark Zuckerberg rather cavalierly, but cannily uses the man and his business to explore deeper themes about modern life in a compelling, but still user-friendly, fashion.