The case became public after the Court of Appeal upheld the refusal by his local préfecture to extend the man's titre de séjour residency permit, and comes as Facebook agrees to work more closely with French authorities.
The man's comments on Facebook posed a “threat to public order” the Court of Appeal concluded, and he has now been ordered to leave the country within one month.
The 31-year-old Moroccan man was originally turned down for an extension to his residency permit by the Préfecture de Police, which handles carte de séjour applications for people living in Paris, in July 2018, but he had appealed the decision.
Now the Court of Appeal upheld the refusal and concluded that the man was “a threat to public order because of his conduct and his words and writings”.
The court heard that his Facebook account revealed an “anti-Western, conspiratorial and anti-French social discourse”.
In addition he had published on Facebook a photograph of a handgun as well as “photographs of women taken without their knowledge on public transport or in public space”.
The man was known to police, and had been arrested while in France, but was never charged with a crime.
In recent months Facebook has committed to working more closely with French authorities, in particular in disclosing the details of users who post racist, homophobic or antisemitic content.
While generally applications for residency merely require a person to be legally resident in France and fulfill certain income criteria, the test for citizenship is sterner and requires people to prove that they are fully integrated into French life and uphold French values.
As well as a language test (for people aged under 60) citizenship candidates are required to undertake an interview at the préfecture where they will be tested on their knowledge of France, French values and French history, and also asked to confirm their commitment to France and its ideals.
And the authorities have the discretion to turn down anyone they don't feel is sufficiently integrated.
In 2018 a woman who had successfully got through the application process was turned down at the last minute for refusing to shake hands with local officials during the citizenship ceremony.
While earlier this year a nurse was denied citizenship for 'working too much' – or working more hours per week than specified in French working regulations.