I am developing an application that allows users to post things anonymously yet comment on posts with their name and profile picture. I want to create a method of data storage that makes it impossible for anyone, even me, to find the posts of a specific person given their public user id.
The process would look something like this:
User authenticates my app with a Facebook login button. They're signed in with their Facebook ID that is unique to them.
I use some deterministic, unknown to me hashing function to return a salted/hashed user app-ID.
User posts and the post is associated with this hashed ID.
Another user comments on this post, and the comment is associated with their public Facebook ID.
Obvious the problem is if someone knows a user ID and has access to my database (either me or a breacher), they can salt and hash it to find the posts associated with this person. I do not want this ability.
I was considering using some user-unique, secret deterministic key that is unknown to me and not stored on my database to salt each Facebook user ID. For this perhaps there is some parameter returned from the Facebook ID that is unique to the user and does not ever change that I could use, but I am reluctant on relying on Facebook API to do this handshake because I don't want the app to break in the future if it ever changes.
Does something like this sound possible? If so, what are your ideas for implementation?