For those that cannot, the law would create an arbitration panel to set a price for news.
The law was passed by the House of Representatives on Wednesday and will now be considered by the Senate.
Both platforms have said the law is unworkable and Google even threatened to remove its search engine from the country, although it has also struck pay deals with some Australian news companies under its News Showcase model.
Facebook regional managing director William Easton said: “The proposed law fundamentally misunderstands the relationship between our platform and publishers who use it to share news content.
More from Facebook
“It has left us facing a stark choice: attempt to comply with a law that ignores the realities of this relationship, or stop allowing news content on our services in Australia. With a heavy heart, we are choosing the latter.”
Australia’s communications minister Paul Fletcher said the government would not back down, adding: “This announcement from Facebook, if they were to maintain this position, of course would call into question the credibility of the platform in terms of the news on it.”
He told the Australian Broadcasting Corp: “Effectively Facebook is saying to Australians information that you see on our platforms does not come from organisations that have editorial policies or fact-checking processes or journalists who are paid to do the work they do.”
Australia is not alone in trying to find a solution to the effect tech giants have had on the finances of news media companies, particularly smaller regional publications.
Last month figures produced by research firm eMarketer revealed 61% of UK media advertising was going to Facebook or Google.
Facebook announced in January that it would roll out its Facebook News product in the UK with payments to publishers for their content. Most major news organisations have signed up, including Sky News.
Facebook News launched in the US last year.
Last week, Google agreed to pay a group of 121 French news publishers as part of a three-year deal to provide compensation for news snippets used in search results.
In Spain and Germany, publishers tried but failed to charge Google for these news snippets.
German publishers lost a legal battle over the issue in 2019.
The two sides struck a deal last year, however, with Google’s chief executive Sundar Pichai saying the company had signed partnerships for News Showcase with nearly 200 publications in Germany, Brazil, Argentina, Canada, the UK and Australia.
Regarding the dispute between Australia and Facebook, however, Australia’s treasurer Josh Frydenberg said there had been a “constructive discussion” with Facebook boss Mark Zuckerberg, who “raised a few remaining issues with the government’s news media bargaining code and we agreed to continue our conversations to try to find a pathway forward”.
Peter Lewis, director of The Australia Institute’s Centre for Responsible Technology think tank, said Facebook would become a “weaker social network” if it refused to budge.
“Facebook’s actions mean the company’s failures in privacy, disinformation, and data protection will require a bigger push for stronger government regulation.
“Without fact-based news to anchor it, Facebook will become little more than cute cats and conspiracy theories.”