如何在网站上登录 twitter javascript

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16068334/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 03:08:39  来源:igfitidea点击:

how to do twitter login on a website javascript

javascripttwitter

提问by Glenn Derycke

I've been looking for how to login with twitter. i found something about twitter @anywhere but it seems that this options has been taken down. does anyone know if there is an other way on how to login with twitter on a website ?

我一直在寻找如何使用推特登录。我发现了一些关于 twitter @anywhere 的信息,但似乎这个选项已被取消。有谁知道是否有其他方法可以在网站上使用 Twitter 登录?

采纳答案by ksloan

Here is the official tutorial for "Implementing Sign in with Twitter":

这是“使用 Twitter 实现登录”的官方教程:

https://dev.twitter.com/web/sign-in/implementing

https://dev.twitter.com/web/sign-in/implementing

回答by Renee Rose-Perry

To create a third party login system for your website using twitter go this article: http://onlinewebapplication.com/login-facebook-twitter-php/

要使用 twitter 为您的网站创建第三方登录系统,请阅读这篇文章:http: //onlinewebapplication.com/login-facebook-twitter-php/

You will see they have a tutorial with files explaining the process.

你会看到他们有一个教程,里面有解释这个过程的文件。

Here is the official twitter documentation: https://dev.twitter.com/docs/auth/implementing-sign-twitter

这是官方推特文档:https: //dev.twitter.com/docs/auth/implementing-sign-twitter

Before you start copying and pasting code it may be helpful to think through every step of the process and each landing page.

在开始复制和粘贴代码之前,仔细考虑流程的每个步骤和每个登录页面可能会有所帮助。

  • Login Page
  • Does user have account Y/N
  • If N then sign up page (then do they have to go back and log in to your site?)
  • If Y enter credentials (then redirect to desired page)
  • 登录页面
  • 用户是否有帐户 Y/N
  • 如果 N 然后注册页面(那么他们是否必须返回并登录到您的网站?)
  • 如果 Y 输入凭据(然后重定向到所需页面)

回答by Seder

Always when you face something like that go directly to the developer API

总是当你遇到类似的事情时,直接去开发者 API

https://dev.twitter.com/

https://dev.twitter.com/

And if you are using PHP you can take look at this awesome library

如果你使用 PHP,你可以看看这个很棒的库

http://www.eden-php.com/

http://www.eden-php.com/

I hope this can help

我希望这可以帮助