SAN FRANCISCO — Facebook is testing a feature that will let users shop directly from its website.
Members on desktop computers or mobile devices can click a "buy" button to make purchases through advertisements or other posts on the world's largest social network, the Menlo Park, Calif.-based company said Thursday in a blog post.
The service is being tested with a few small and medium-sized businesses in the United States.
Facebook, which has more than 1.2 billion users, has tried enabling purchases on its social network in the past, with limited success. Facebook Credits, a virtual currency that let users make purchases within games, was abandoned in 2012.
Now, the company needs to keep pace with rivals Twitter and Google, which are adding tools to let people more seamlessly buy goods from their sites.
Microblogging service Twitter last year hired Ticketmaster executive Nathan Hubbard to explore ways to let people purchase goods directly from Tweets. Twitter Chief Executive Officer Dick Costolo has said that the effort would lead to "commerce in the moment."
The San Francisco-based company also recently signed a deal with Amazon.com, the largest online retailer, to let Twitter members shop by hashtag.
When completing a transaction through Facebook, users' credit- or debit-card information won't be shared with other advertisers, the company said.
"We've built this feature with privacy in mind, and have taken steps to help make the payment experience safe and secure," Facebook said in the blog post.
Facebook is testing the "buy" button even after saying earlier this year that direct purchases wouldn't be the best strategy to serve marketers.