Newcastle's fourth straight home win moved Rafa Benitez's team up 13th place, above Burnley, whose eight game unbeaten run came to an end.
Swiss defender Schar smashed a fierce drive from 28 metres off the inside of the post and past a helpless Burnley keeper Tom Heaton to put the Magpies ahead in the 24th minute.
Home keeper Martin Dubravka then did well to keep out a volley from in-form Burnley striker Chris Wood after a rare spell of pressure from the visitors.
Newcastle, whose record signing Miguel Almiron impressed again, went 2-0 up when local-born midfielder Longstaff reacted well after Burnley failed to deal with Matt Ritchie's left-wing cross and drove low past Heaton.
Burnley defender James Tarkowski missed a great chance from close range shortly before the break but Sean Dyche's side were well below-par and struggled to create chances in the second half.
It was a Newcastle performance, combining solid defensive organisation with just enough flair in attack, which showed exactly how they have been able to pull away from mid-season troubles at the bottom of the table.
Bottom club Huddersfield Town earned their third Premier League win of the season as a stoppage-time goal from Steve Mounie gave them a 1-0 victory over Wolverhampton Wanderers on Tuesday.
Gylfi Sigurdsson deepened Cardiff City's Premier League relegation fears with two well-taken goals in Everton's 3-0 victory in the Welsh capital.
Sigurdsson is now the leading Icelandic goalscorer in the Premier League, moving two clear of the 55 scored by former Chelsea player Eidur Gudjohnsen.
Tags: