I am a Nigerian citizen and I came to France illegally. I was refused asylum. For five years now I have being renewing my one year card. I want to get the ten years card. The law said if you have stayed five years in France you can get the ten years resident card. What do I need to do to get the ten years card?
What you seem to have overlooked is that you must have resided in France legally.
The Service-Public.fr portal states that the card for résident de longue durée - UE can be issued to a foreigner who is not a national of a European country, provided that they are residing in France "legally and continuously for at least the past 5 years."
Only the authorities can determine whether you are now considered eligible, and you apply for the card with the prefecture or sub-prefecture of your residence, within 2 months before the expiry date of your current residence permit.