A court heard today how Ross Hunter jumped out of a car and told Aaron Hogan he was going to kill him when he saw him waiting at a bus stop in Baildon last October.
During the lunchtime confrontation Hunter, of Sissons Road, Middleton, chased after his victim armed with a black-handled kitchen knife.
As Mr Hogan tried to escape by climbing over a six-foot gate in an alley he was stabbed once in the chest.
Mr Hogan, who thought he was going to die, was helped by a local resident after collapsing in the street as Hunter got back in the car and fled the scene.
Prosecutor Rupert Doswell said Mr Hogan, who spent eight days in hospital, later discovered that Hunter had been making threats towards him over a number of days.
Mr Doswell said the complainant thought Hunter had "got the wrong end of the stick" because he just wanted to chat to the woman.
In his victim impact statement Mr Hogan described having lost half his liver as a result of the attack and contracting an infection which required a blood transfusion.
He now had a 12-inch scar down his chest and said he was "a nervous wreck".
Last month 26-year-old Hunter, who has a previous conviction from 2011 for robbery offences, pleaded guilty to a charge of wounding with intent to do grievous bodily harm as an alternative to an attempted murder allegation.
Barrister Peter Hampton, for Hunter, said the incident had "got out of hand" and shocked his client as well as the complainant.
Mr Hampton said the defendant had shown some insight into what he had done and was genuinely remorseful.
The Recorder of Bradford Judge Jonathan Durham Hall QC said what Hunter had done because of an apparently innocuous contact over Facebook was "truly alarming" and both parties were very lucky that Mr Hogan had not died.
The judge, who dscribed the defendant as cowardly and "a nasty piece of work", said a sentence of less than seven years would be an offence to the victim and society and any more would be unfair to Hogan.
But he warned the defendant if he did anything like it again he would be going to prison for life.