Sha'bi reported that the Messenger of Allah (ﷺ) observed prayer over a grave after the dead was buried and he recited four takbirs over him. Shaibani said: I said to Sha'bi: Who narrated it to you? He said: An authentic one, 'Abdullah bin 'Abbas. This is the wording of the hadith of Hasan. In the narration of Ibn Numair (the words are): The Messenger of Allah (ﷺ) went to the grave which had been newly prepared and prayed over it, and they also prayed who were behind him and he recited four takbirs. I said to 'Amir: Who narrated it to you? He said: An authentic one who saw him, i e. Ibn 'Abbas.
This hadith has been narrated through another chain of transmitters, but in none of them (are these words found):" The Apostle of Allah (ﷺ) recited four takbirs."