Recently, Wang, Wei and Zhang define the recollement of extriangulated categories, which is a generalization of both recollement of abelian categories and recollement of triangulated categories. For a recollement $(mathcal A ,mathcal B,mathcal C)$ of extriangulated categories, we show that $n$-tilting (resp. $n$-cotilting) subcategories in $mathcal A$ and $mathcal C$ can be glued to get $n$-tilting (resp. $n$-cotilting) subcategories in $mathcal B$ under certain conditions.