حَدَّثَنَا جَعْفَرُ بْنُ مُحَمَّدٍ الْفِرْيَابِيُّ، ثنا سُلَيْمَانُ بْنُ عَبْدِ الرَّحْمَنِ الدِّمَشْقِيُّ، ثنا عَبْدُ الرَّحْمَنِ بْنُ مَغْرَاءَ، ثنا رِشْدِينُ بْنُ كُرَيْبٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «لَا يُصَلَّى إِلَى قَبْرٍ وَلَا عَلَى قَبْرٍ»
It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said: "Prayer is not to be offered facing a grave, nor upon a grave."