How to setup test users on Facebook and Twitter to test Social Sharing
— Social Sharing, Testing, Quick Tip — 2 min read
So the other day I needed to test social sharing buttons I had placed on a Wordpress website under development on a staging site. Before we went live, we needed to be sure that the Twitter button could share a pre-defined message and link and the same with Facebook. But I couldn't post on my personal Facebook and Twitter account so I was curious to know what options are available for setting up a sandbox account or test users on FB and twitter.
Turns out, Facebook provides a very straightforward way to setup test users. More information can be found in their documentation here: https://developers.facebook.com/docs/development/build-and-test/test-users/.
Twitter however does not provide any such ability. Even if you create a dummy account for testing purposes, your tweets normally would still be visible to the world.
But there is a workaround. As per a suggestion in this SO thread, you can create a Twitter account and set your Tweets to Protected.
You can do that by going to Settings → Privacy and Safety → Audience and Tagging and checking the Protect Your Tweets checkbox.
The Protected tweets setting ensures that your tweets are only visible to your followers and no one can follow you without first getting your approval. If anyone wants to follow you, they must send a follow request which you can then allow or deny. You can read the relevant twitter documentation for more details.
So I setup a test user and unchecked this option thus making sure that my tweets are not visible publicly. I don't intend to have anyone follow this test Twitter account so even if someone sends me a follow request, I'll deny it.
I also went ahead and unchecked both the options in the below screenshot. These options appear in Settings → Privacy and Safety → Discoverability and contacts.
Hope this helps!👍