Microsoft’s friendship with Facebook just got more expensive.

The company said it will invest $240 million in the social networking site, a move that gives Facebook a valuation of $15 billion.

Central to the investment is an agreement that makes Microsoft the exclusive third-party advertising partner for Palo Alto, Calif.-based Facebook through 2011.

Deal essentially expands an existing agreement Microsoft had with Facebook to sell advertising for the site. Original deal had covered the U.S., but will now include foreign territories as well.

Facebook has more than 49 million users, the company said, with 59% of Facebook’s users residing outside the U.S.

In 2006 Microsoft was named the exclusive provider of standard banner advertising on Facebook using Microsoft’s digital advertising solutions and its adCenter platform.

“We’ve been working with Microsoft for over a year now in the U.S., and it’s been a partnership that’s been really great for both of us,” said Owen Van Natta, VP of operations and chief revenue officer.

Partnership doesn’t yet call for Facebook to start integrating Microsoft’s services like Windows Live Messenger or Hotmail.