After an investigation of months conducted jointly with the F.B.I., French authorities on Tuesday detained a 25-year-old Frenchman accused of hacking the Twitter accounts of several high-profile people, including the official account of President Obama and an account for Britney Spears, French media reported Wednesday. The man, known by the alias Hacker Croll, is accused of infiltrating the accounts on Twitter, a social networking Web site, in April 2009. French authorities have not revealed his real name. The man was released Wednesday but is set to face charges in court in June. He could be sentenced to up to two years in prison if convicted.