It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that Sayyiduna Umar (may Allah be pleased with him) said: "I saw the Prophet (peace and blessings be upon him) in a dream, and I saw that he (peace and blessings be upon him) was not looking towards me. I said: O Messenger of Allah (peace and blessings be upon him), what is the matter with me? He (peace and blessings be upon him) said: 'Are you not the one who kisses while fasting?' He said: By the One who sent you (peace and blessings be upon him) with the truth, after this I will never kiss while fasting."
Ishaq, Abu Bakr bin Abi Shaybah and al-Bazzar recorded it with a da'if (weak) chain, because its chain contains Amr bin Hamzah bin Abdullah bin Umar, who is a weak narrator. Al-Tirmidhi said: "The Companions of the Prophet (peace and blessings be upon him) (may Allah be pleased with them) and other scholars have differed about a fasting person kissing. Some of the Companions (may Allah be pleased with them) permitted kissing for an old man but did not permit it for a young man, out of fear that his fast might not remain sound, and embracing (body to body contact) is a more serious matter in their view. Some scholars have also said that kissing reduces the reward but does not break the fast of the fasting person. Their view is that if the fasting person has control over himself, he may kiss, but if he does not feel safe about himself, he should leave kissing so that his fast remains sound; and this is the view of Sufyan al-Thawri and al-Shafi'i."