Your challenge is to have Yorubaland - the cultural territory of the Yoruba people that spans parts of what is now Benin, Togo and Nigeria - be a united political entity by 1900.
In 1859-ish right before the Ijaye war between ijaye and Ibadan started mediation was Attempted between various Yoruba obas because of what this war was looking to turn into and would become, a war spanning all of yorubaland. What built up to the war was the collapse of the Oyo empire,and Ibadan defeating the Sokoto caliphate essentially becoming the Yoruba military power. Most Yorubas wanted reunification and most wanted it under the oyo clan(the Yorubas are composed of about 20 different “clans”). But their were three kingdoms that had claimed oyo lineage,the ijaye,Ibadan,and Oyo. Seeing as oyo is too militarily weak to reunify on its own really ijaye and Ibadan. Even though Ibadan won the ijaye war and many after because they followed the liberal “meritocratic” ideals of the long dead Basorun Gaha no one would accept Ibadan rule leading to war after war.
All of this background is to say all you really need is to get rid of ijaye and Ibadan would be willing to negotiate reunification with oyo keeping political power while they held military power. A nation like that complete not only with all that led the first oyo empire to succeed but additionally breechloading firearms and tons of artillery. Considering Abeokuta one of the Yoruba states was quickly modernizing and according to some British scholars the most modern state in west africa the push for modernization would likely spread across the New or Second oyo empire here. If it enters a imperial age I could see them retaking Dahomey, taking the weakened Benin for palm oil,and retaking Illorin and possibly Nupe from the weak Sokoto Caliphate.
A nation like this one would actually do pretty well once colonization starts to hit, makes me wanna make a Yoruba AH