We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
I am working on twitter sign-up on my web application and I have an issue that I am not quite sure what the problem is.
-----------TwitterAuth.php-----------
` class TwitterAuth{
protected $cliente; protected $clienteCallback = "http://127.0.0.1/#twitter/callback.php"; public function _construct(\Codebird\Codebird $cliente){ $this->cliente = $cliente; } public function getAuthUrl(){ $this->requestTokens(); $this->verifyTokens(); return $this->cliente->oauth_authenticate(); } public function requestTokens(){ $reply = $this->cliente->oauth_requestToken([ 'oauth_callback' => $this->clienteCallback ]); $this->storeTokens($reply->oauth_token, $reply->oauth_token_secret); } protected function storeTokens($token,$tokenSecret){ $_SESSION['oauth_token'] = $token; $_SESSION['oauth_token_secret'] = $tokenSecret; } public function verifyTokens(){ $this->cliente->setToken($_SESSION['oauth_token'],$_SESSION['oauth_token_secret']); } public function isLogin(){ return false; }
}`
-----------init.php-----------
` session_start();
require_once('vendor/autoload.php'); require_once('app/TwitterAuth.php');
\Codebird\Codebird::setConsumerKey('xxxxxxxx','xxxxxxxxxxxxxxxx');
$cliente = \Codebird\Codebird::getInstance();`
-----------index.php-----------
`require_once('app/init.php');
$auth = new TwitterAuth($cliente);
if($auth->isLogin()){ echo "
Esta en el sistema. Cerrar Sesion
"; }else{ echo $auth->getAuthUrl(); }`
The text was updated successfully, but these errors were encountered:
hello, u solved that ? my Codebird::getInstance(); return null
Sorry, something went wrong.
@lepfsd Can you tell me more details about your null return value?
null
No branches or pull requests
I am working on twitter sign-up on my web application and I have an issue that I am not quite sure what the problem is.
-----------TwitterAuth.php-----------
`
class TwitterAuth{
}`
-----------init.php-----------
` session_start();
require_once('vendor/autoload.php');
require_once('app/TwitterAuth.php');
\Codebird\Codebird::setConsumerKey('xxxxxxxx','xxxxxxxxxxxxxxxx');
$cliente = \Codebird\Codebird::getInstance();`
-----------index.php-----------
`require_once('app/init.php');
$auth = new TwitterAuth($cliente);
if($auth->isLogin()){
echo "
Esta en el sistema. Cerrar Sesion
";
}else{
echo $auth->getAuthUrl();
}`
The text was updated successfully, but these errors were encountered: