最佳实践 - 是否存储 Twitter 凭据? [英] Best practices - store Twitter credentials or not?

查看:28
本文介绍了最佳实践 - 是否存储 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.

这篇关于最佳实践 - 是否存储 Twitter 凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆