Facebook on Thursday confirmed that it is now testing a "Buy" button on ads and page posts.

The button, aimed at helping companies "drive sales through Facebook in News Feed and on Pages," will let you purchase products directly from a business, without leaving Facebook. At this point, Facebook is testing the new feature with just a few small and medium-sized U.S. businesses.

"We've built this feature with privacy in mind, and have taken steps to help make the payment experience safe and secure," Facebook said. "None of the credit or debit card information people share with Facebook when completing a transaction will be shared with other advertisers, and people can select whether or not they'd like to save payment information for future purchases."

Facebook isn't the only company testing out this type of feature. Twitter has been quietly testing a new "Buy now" button that apparently lets you purchase items featured in tweets without leaving the site. Re/code earlier this month spotted the button in tweets from the shopping app Fancy. The buttons could only be seen on Twitter's mobile app, and were not working when Re/code tested them out.

Meanwhile, Facebook has been busy beefing up its ad options as of late. The company last month rolled out new ad preferences, giving users more control over what products and services they see on the social network. Facebook also recently launched Premium Video ads, which automatically come to life as users scroll through their timeline, and a mobile ad placement system called Audience Network, which lets advertisers extend campaigns beyond the site and into other mobile apps.

PC Magazine