Treasurer Josh Frydenberg confirmed the last-minute legislative changes on Tuesday afternoon after days of negotiations with the social media giant.
"These amendments will provide further clarity to digital platforms and news media businesses about the way the code is intended to operate and strengthen the framework for ensuring news media businesses are fairly remunerated," he said.
"The government has been advised by Facebook that it intends to restore Australian news pages in the coming days."
The amendments will give parties more time to broker agreements before they are forced to enter binding arbitration.
The changes also clarify the government's role in considering commercial deals struck between parties, and give digital platforms one month's notice before they are formally designated under the code.
Facebook said it was pleased to have reached an agreement with the government after discussions with the treasurer and Communications Minister Paul Fletcher.
"After further discussions, we are satisfied that the Australian government has agreed to a number of changes and guarantees that address our core concerns about allowing commercial deals that recognise the value our platform provides to publishers relative to the value we receive from them," the company said.
"As a result of these changes, we can now work to further our investment in public interest journalism and restore news on Facebook for Australians in the coming days."
A key crossbench senator has torn strips off Labor and the Greens for supporting the code.
Jacqui Lambie says the code, which will require digital platforms to pay for Australian news, will make media organisations even more dependent on the success of Google and Facebook.
Senator Lambie argues the money generated will simply shift from one set of corporate titans to another.
"Shareholders of News Corp and Nine will be delighted that their dividend is about to be fattened up on the back of shareholders in Facebook and Google," she told parliament.
Senator Lambie said businesses wanting to advertise online would end up bearing the cost of tech giants paying for news.
"This is a bipartisan shakedown delivered by a consensus of absolute stupidity."
And she savaged a Greens proposal to ensure money that flowed from the code was spent on journalism.
She said taxes were the best way of pumping money into journalism but argued the money shouldn't go to media companies but journalism itself.
"If we want more money for journalism, let's tax companies making heaps of money and put that money into supporting journalism, put it directly into journalism," Senator Lambie said.
"If we want Google and Facebook to pay more tax, let's make them pay more tax."
The bargaining code is expected to pass the Senate this week with support from Labor and the Greens, who will seek some minor amendments.
Senator Lambie said both parties should be embarrassed about supporting the legislation.