Twitter 当我让某个用户登录到我的应用程序时,我可以访问他/她有关的哪些信息。通过推特

Twitter 当我让某个用户登录到我的应用程序时,我可以访问他/她有关的哪些信息。通过推特,twitter,login,twitter-oauth,Twitter,Login,Twitter Oauth,我想为我的web应用程序提供“使用twitter登录”功能。当用户登录时,我想请求他共享有关其个人资料和推文的特定信息,因为我想阅读这些信息并根据这些信息构建一些建议。然而,我不知道该用户可以从twitter获得哪些信息。你能给我指一些代码/文档来帮助我做这件事吗 谢谢 卡比尔到目前为止,您在阅读文档时发现了什么? <?php require_once('config.php'); // Get consumer key and consumer secret from config f

我想为我的web应用程序提供“使用twitter登录”功能。当用户登录时,我想请求他共享有关其个人资料和推文的特定信息,因为我想阅读这些信息并根据这些信息构建一些建议。然而,我不知道该用户可以从twitter获得哪些信息。你能给我指一些代码/文档来帮助我做这件事吗

谢谢 卡比尔


到目前为止,您在阅读文档时发现了什么?
<?php
require_once('config.php');

// Get consumer key and consumer secret from config file
// retrieve access token stored in database

require_once('twitteroauth.php');

$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET );

$response = $connection->get('account/verify_credentials');

// This returns an object with the following info (user account info)
// [https://dev.twitter.com/rest/reference/get/account/verify_credentials][1]

$response2 = $connection->get('statuses/home_timeline');

// This returns an object with the following info (user timeline tweets) 
//https://dev.twitter.com/rest/reference/get/statuses/home_timeline

?>