Fueled by the meteoric rise of Jeremy Lin, the NBA has rocketed its way to social media dominance in American sports, driving soaring television ratings in a season many thought would be lost to a lockout.

The NBA and its teams have more than 185 million fans across the globe on Twitter and Facebook, and according to social media analytics firm General Sentiment, the league has also generated more social media discussion than any other sport since the start of 2011.

“Viewers are using Twitter not just for news but as a TV Guide,” Melissa Brenner, the NBA’s senior vice president of marketing, told TheWrap. “Having the penetration that we do on Twitter, people see NBA teams and players and other terminology in the top 10 trending topics and it is nothing short of beneficial.”

It's not just Twitter. Facebook users have given the NBA has more than 11 million "likes" and provide the NBA with fan opinions and traffic to its own website.

Facebook is now the second biggest source of traffic to the NBA’s home site, whereas two years ago it wasn’t even ranked in the top 10.

And on YouTube — the NBA’s first real social outreach platform back in 2006 — the highlight-driven nature of the sport makes it a perfect match.

No wonder ratings on ABC, ESPN, TNT and NBA TV have made double-digit gains from last year, when the league also showed major growth.

NBA TV in particular seems to be reaping the benefits. Five of its 10 most-watched games ever have occurred this season. Ratings are up 52 percent over last year. MSG Network, the home TV station in New York, has repeatedly posted record ratings, especially once it ended its dispute with Time Warner Cable.

And with the All-Star Game this weekend, expect James and Dwight Howard to set off a tweet-apalooza.

Then there's Jeremy Lin.

The "Linsanity" surrounding the emergence of the New York Knicks' young star has been fueled in large part by social media. Facebook became a repository for endless videos and articles (Lin just added his own profile) and Twitter users mentioned Lin's name 2.6 million times during the week of Feb. 6-14. To put that in perspective, that's more than President Obama's name was tweeted that week.

Lin may be the NBA's newest poster boy in terms of social media attention, but he's not the only player driving online users to watch the NBA on TV. James, Howard, Dwayne Wade and Lamar Odom Along with James, are also scoring tweet slam dunks (see chart, right).

Topping them all, the NBA itself has more than 4 million followers on Twitter, where it often sends in-game tweets directing people to watch.

“The whole idea behind social is that people aren’t watching less TV,” Greg Artzt, co-founder of General Sentiment told TheWrap. “If they see something on both their TV and their mobile phone, it will increase their overall recall and connection to whatever the content is."

The benefit can be seen beyond the ratings. The NBA says merchandise sales are up 30 percent over the last year. While neither this nor the ratings are due solely to social media, it's hard to argue that free advertising isn't helping.

Artzt's company, General Sentiment, tracks the numbers of mentions a certain brand gets on social media sites. It also tracks "media value," an estimate of the amount of free marketing and advertising a brand is getting from the social media mentions. For the NBA, the value since the start of the season has already topped $140 million.

Securing those extra dollars from the advertisers for this extra engagement remains a work in progress. As Artzt puts it, “that’s the million-dollar question.”

One boon for the NBA is that more than any other U.S. sports league, the NBA is a league of superstars, and that gives it even more social media clout. About 75 percent of the league's players are on Twitter, a much larger percentage than other leagues.

"If LeBron James is tweeting, it will just have more of an effect, more exposure than your average NFL player," Artzt said. “[The stars] are freely tweeting and out there as personalities.”

The NBA's fan base — young and more urban than other U.S. sports — is attuned to the social sphere. Major League Baseball pioneered digital and social initiatives years ago, but its audience skews older.

Networks broadcasting the games also integrate Twitter into their broadcasts, posting tweets from players and fans and encouraging viewers to tweet at the show. The league is not unique in doing so, but it adopted these tactics early and has used that advantage to grow its base.

Each team has built up its own following as well, as have most of the players. The Charlotte Bobcats may have 45,000 followers, but others accounts, like those of the Los Angeles Lakers or James, draw millions of eyeballs a day (see chart, right).

While Twitter may stand out in terms of driving ratings, other social platforms provide different benefits to the league. All of them engage fans and stir up conversations however, and the league coordinates its use of the various platforms.

“It’s integral to overall marketing of our sport,” Brenner said.

Facebook, for example, allows the league to target its diverse and growing international audience. Because basketball is a more popular sport around the globe than is baseball or football, social media has been a major way for the NBA to tap into that enthusiasm.

“We are a global brand; we want to be able to speak in the languages that our fans use,” Brenner said.

Brenner says the key to its approach has been a desire to be wherever the NBA consumer is, first.

That is one reason the NBA has already exploded on another burgeoning platform – the photo-posting site Instagram.

The NBA hasn’t officially launched its account, as no photos have been posted. However, because Instagram is linked up with other platforms, like Facebook and Twitter, its mere existence has given it a growing following.

“One of the things that will indicate whether a brand or organization has a lot of engagement on Instagram is if they do much on other media platforms," Amy Cole, who handles business operations at Instagram, told TheWrap. "You see accounts linking Twitter and Facebook to Instagram.”

Instagram provides fans with a different way to connect with the team, from behind the scenes photos to archival images.

It doesn't' hurt that specific teams, like the Boston Celtics, jumped in much earlier. Those that jump in now can find an instant audience.

"The L.A. Lakers just joined Instagram probably a month ago and they already have almost 50,000 followers," Cole said.

Cautious of offending other partners – or potential ones – Cole did not want to compare the NBA's commitment to an overall social media strategy with other pro sports.

However, she did say that have had frequent contact with the NBA about launching the account.

“A big secret to our success is that we have very good relationships with all of the platforms and talk to them all the time,” the NBA's Brenner said.

“It all starts with the top brass. Commissioner’ David Stern and [Deputy Commissioner] Adam Silver have always directed organization to be extremely ambitious in digital space.”

Just a few months ago, Stern drew the ire of fans everywhere – both because of the prolonged lockout and because he vetoed the trade of Chris Paul to the Lakers. People wondered if he had soiled his legacy.

Now, the league is about to deliver the year’s biggest showcase of its stars, the All-Star Game, and is heading into it with the most buzz in years.

Perhaps the biggest event of all is not the game itself, but the Slam Dunk Contest, which will be decided by votes on what else — Twitter.