开发者

For Twitter , how to create test user accounts?

Facebook allows you to create test user accounts that can only be used for te开发者_运维知识库sting purpose.

Does Twitter provide similar functionality ? I don't want to get my application blacklisted for creating fake user accounts; do I have to use my real user account for testing my application ? What strategies are your using for testing application with Twitter ?


As far as I know, there is nothing in Twitter's rules against creating account (unlike Facebook, where with the exception of test accounts, you're not allowed to create multiple accounts for testing purposes). So, you can just register the account like you normally would.

You might want to take a look at this post for some other tips for test accounts (hiding your tweets, deleting the account when you're done testing, etc.).


I'm currently creating a Twitter application and here are some of the strategies I'm using.

  • I create my accounts in combination with Gmail addresses. If I create a gmail account as user bob@gmail.com , I secure the Twitter name @bob on Twitter. That way it's kind of hard to forget where to email a lost password. I don't go crazy, as I don't need 100's of test accounts but I do have up to three.

  • I log on to my test accounts using Chrome because it will automatically recall your password as soon as you type in your Twitter name on the home page. That way it is easy to switch between them, but note that I find it hard sometimes to know which account is actually active because I'm constantly looking at other profiles. This gets confusing if I don't constantly look at the logged in user icon indicator.

  • Never, ever re-tweet anything unless you absolutely have to for a test case or use hash-tags unless for a test case. Unbelievably even on a completely un-publicized account, I had a few surprise Twitter users in my DB a few seconds after I re-tweeted a link.

  • on Localhost, close all your other browser windows while your testing. Especially if your calling the API through AJAX. You never know which sites you have open whom also call the Twitter API through AJAX, and this can seriously screw with your tests and rate limits. Especially when your developing live.

  • I would not recommend protecting your tweets. It's too limiting for most use cases.

  • For my site, I need to place a link in the tweets. Twitter will not allow live links to http://localhost so you have to plan around this and have a live test server sooner then you may anticipate.


Twitter has one of the easiest registration processes I have seen. You can quite easily create several test accounts; this is the only method I have used.

Here is a blog post about it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜