Updated

Facebook is testing a "Buy" button in its latest effort to help businesses drive sales through the world's biggest online social network.

The company says in a statement that the button will let people buy products directly from businesses without leaving Facebook. The button appears in sponsored ads and is being tested by several small- and medium-sized businesses in the U.S.

The move comes as Facebook continues to grow its advertising business. The company will account for 7.8 percent of global digital ad spending this year, up from 5.8 percent in 2013, according to eMarketer. Google, the world's No. 1 recipient of ad dollars, is expected to account for 31.5 percent of ad spending in 2014.

Facebook says it won't share users' credit and debit card information with other advertisers.