Earlier quoted context omitted.
They can hold you indefinitely for effectively whatever reason they'd like (or really no reason). If they say they're not letting you go until you unlock your phone, you get to decide if you want to stay there in the interests of your privacy.
Sorry, my question was can they do that for my account information as well? Could they setup kiosks for me to sign into Facebook? The author in the post advocated uploading my data into the cloud and factory resetting my phone, though I don't believe this will work if they can just ask me for my Facebook.
The author is arguing that they wouldn't know the usernames or even the services themselves of your accounts and as such could not ask for them. I call bullshit on that (see my top level comment on this).