There are more- and less- formal restrictions on how long they can detain you, but my mental model is just that they can detain you for basically any reason --- it is not my claim that there are magic words that can get the police to go away, or to stop asking you questions, and you might just have to put up with it until they get tired of you.
The next step, though, where they trundle you off to a police station for interrogation --- that's an arrest. It's a big deal. Actual cause is needed.
You've made good points on this. My concern would be that police officers have an obligation to gather this information as it states in the article, and that they would lean on their powers to detain and arrest in order to coerce that information.
Let's run through a hypothetical. Routine traffic stop. Cop pulls out one of these cards and asks for your handles. You refuse, claim Miranda rights, or something similar. Cop says you, "match the description of a known suspect" (in a city as large as LA everyone matches a known suspect) and this is part of the ID process. "Of course, we can do a check using the computers at the station but you'll need to come with us until we confirm your ID ..."
Now, following through on that threat is an arrest, but under California law police have 48-hours to investigate before either charging you with a crime or releasing you. I doubt most officers would use the entire time, but letting someone stew for the afternoon in a drunk tank seems entirely within reason. During that time their car has been impounded and they're either missing work or missing time with their loved ones. Refusing to self identify could carry an effective fine in the hundreds of dollars, and that worries me.
I don't think it's plausible that the police will routinely rely on arrests to get social media information from random stops, for a bunch of reasons; part of it is that it's unlawful for them to do so, but the bigger part of it is that it's incredibly inefficient and painful for them to do that too.
If the argument is that the police will use this as a pretext to arrest people they want to arrest anyways, well, it's a dumb pretext. They have dozens of pretexts that aren't overtly unlawful; the idea that they're going to haul people in for an offense that they won't be able to articulate when they process you at the station (because it is not in fact a violation of any California statute) seems, to me, far-fetched.
It is problematic that they ask this question. I'm not lobbying for its inclusion. It's bad because people will, as has been pointed out all over the thread (including by my top comment) believe they have to answer. But the response to that problem should be to educate people not to answer the question, not to accept the victimizing framework of the article.
The police, by the way, cannot hold you for 48 hours while looking for something to charge you with. To arrest you, they need probable cause of a specific crime, which they'll need to provide when they book you. They can then charge you with other stuff they dream up while they hold you, but they need something to start with. Again: refusing to answer this question isn't "Obstruction of justice" (which isn't a California offense in the first place); the California "resisting" statutes generally require force or violence on your part, or your interference with their questioning of someone else.
There are more- and less- formal restrictions on how long they can detain you, but my mental model is just that they can detain you for basically any reason --- it is not my claim that there are magic words that can get the police to go away, or to stop asking you questions, and you might just have to put up with it until they get tired of you.
The next step, though, where they trundle you off to a police station for interrogation --- that's an arrest. It's a big deal. Actual cause is needed.