A meeting in Riyadh that lasted more than two hours was said to be cordial but underscored differences over Iran, human rights and the best way to fight terrorism.