An estimated 150 million users were featured within the Sponsored Stories, but only 164,000 will receive the payout as they had to email to opt in earlier this year.
Each user will receive $15 (£9.55) as compensation and privacy companies will also receive part of the settlement.
A Facebook spokesperson confirmed the figures and told Media Week: “We are pleased that the settlement has received final approval.”
The lawsuit began in 2011 after a class action group claimed Facebook’s Sponsored Stories violated their privacy by using user’s “likeness” to endorse products without obtaining permission or paying for them.
The Sponsored Stories published the name and image of users’ friends who had interacted with the brand paying for the ad.
An earlier settlement, also for $20 million, was rejected as it did not allocate any of the payout to affected users, offering instead to pay $10 million to organisations to educate people how to use social media networks safely.
As part of the ruling Facebook will also have to make changes to its Statement of Rights, and will explore how to make its controls more upfront and accessible and give more information and control over how users details are used in future.