Al-Sha'bi (may Allah have mercy on him) said: I was informed by someone who was with the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) came to an isolated grave, arranged them in rows, stood in front himself, prayed the funeral prayer over it and said four takbirs. Sulayman (may Allah have mercy on him) said: I said: "O Abu Amr! Who narrated this hadith to you?" He said: "Sayyiduna Ibn Abbas (may Allah be pleased with them both)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 6934