如何使用令牌对通过Twitter登录的用户进行身份验证

时间:2019-09-18 09:29:34

标签: php laravel twitter twitter-oauth laravel-socialite

我正在尝试将Twitter登录到我的应用程序中,我使用socialite从twitter获得了oauth_token,然后按照https://developer.twitter.com/en/docs/basics/authentication/api-reference/authenticate

的步骤进行操作

然后我将用户的令牌传递到以下URL:https://api.twitter.com/oauth/authenticate?oauth_token=some_token

但是它总是提示我“此页面的请求令牌无效”。

1 个答案:

答案 0 :(得分:0)

对于Laravel,

您可以使用社交名流

  

https://laravel.com/docs/5.8/socialite