最佳实践 - 是否存储 Twitter 凭据?

最佳实践 - 是否存储 Twitter 凭据?

问题描述:

我希望能够让我的用户能够在我网站上的个人资料中显示他们最近的推文.

I'd like to be able to give my users the ability to display their recent tweets on their profile on my website.

我有一个 PHP twitter 包装器,并且了解如何进行 API 调用等,但我只是想知道如何管理用户信息.

I have a PHP twitter wrapper and understand how to make API calls etc, but I'm just wondering how to manage the user information.

这里的最佳做法是什么?我希望他们能够输入一次他们的凭据,但我认为自己存储每个人的用户名/密码并不是最好的方法.

What is the best practice here? I want them to be able to enter their credentials once, but I would imagine storing everyones username/password myself isn't the best way to go about it.

  • 有没有办法进行一次经过身份验证的调用,并让 Twitter 记住它?
  • 我是否应该存储用户名/密码,然后在显示推文时拨打电话?

这里的任何建议都会很棒.

Any advice here would be great.

谢谢,

使用 OAuth,无需询问用户密码:

Use OAuth, no need to ask users for their passwords:

http://apiwiki.twitter.com/Authentication

我认为每个人都会/应该可能同意存储 twitter 用户名/密码是不好的,我不敢相信他们曾经创造过你需要它的情况.

I think everyone would/should probably agree that storing the twitter usernames/passwords is bad, I can't believe they ever created a situation where you needed it.