Five plaintiffs filed a class action against Facebook in 2011, saying the social networking giant's "Sponsored Stories" program shared users' "likes" of certain advertisers with friends without paying them or allowing them to opt out.
A "Sponsored Story" is an advertisement that appears on a member's Facebook page and generally consists of a friend's name, profile picture and an assertion that the person "likes" the advertiser.
The case has highlighted tension between privacy concerns and Facebook's drive to monetize user content.
Under the terms of the settlement, Facebook will pay $20 million to compensate class members, and promised to give users more control over how their content is shared - changes which plaintiff lawyers estimate to have a value of up to $145 million.
Facebook charged advertisers nearly $234 million for Sponsored Stories between January 2011 and August 2012, court filings show.
Child rights advocates had argued that no minors should have their content shared with advertisers.
But in an order on Monday, US District Judge Richard Seeborg in San Francisco wrote that the settlement, "while not incorporating all features that some of the objectors might prefer, has significant value."
Representatives for Facebook, the plaintiffs or objectors could not immediately be reached for comment.
The case in US District Court, Northern District of California, is Angel Fraley et al., individually and on behalf of all others similarly situated vs. Facebook Inc, 11-cv-1726.