alexa-tracking

redirecth twitter need help :(

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/53eb2c0360e24b37058b45a1/redirecth-twitter-need-help
redirecth twitter need help :(
halo gannn ane buat sign in pake twitter emoticon-Smilie . ane stuck sampe sini gan , jadi uda bisa redircth nah ketika di halaman yang di redirecth . id twitter dan gambar id kok gak muncul ya? scripnya gini gan:

<?php
require("twitteroauth/twitteroauth.php");
require 'config.php';
session_start();

if(isset($_SESSION['name']) && isset($_SESSION['twitter_id'])) //check whether user already logged in with twitter


echo "Name :".$_SESSION['name']."<br>";
echo "Twitter ID :".$_SESSION['twitter_id']."<br>";
echo "Image :<img src='".$_SESSION['/><br>";
echo "<br/><a href='logout.php'>Logout</a>";



?>

ada yang salah ya?
PHP Code:

if(isset($_SESSION['name']) && isset($_SESSION['twitter_id'])) 


ini mana statement nya gan ?
sori gan ini lengkapmya

<?php
session_start();
require_once('twitteroauth/twitteroauth.php');
include('config.php');


if(isset($_SESSION['name']) && isset($_SESSION['twitter_id'])) //check whether user already logged in with twitter
{

echo "Name :".$_SESSION['name']."<br>";
echo "Twitter ID :".$_SESSION['twitter_id']."<br>";
echo "Image :<img src='".$_SESSION['/><br>";
echo "<br/><a href='logout.php'>Logout</a>";


}
else // Not logged in
{

$connection = new TwitterOAuth($CONSUMER_KEY, $CONSUMER_SECRET);
$request_token = $connection->getRequestToken($OAUTH_CALLBACK); //get Request Token

if( $request_token)
{
$token = $request_token['oauth_token'];
$_SESSION['request_token'] = $token ;
$_SESSION['request_token_secret'] = $request_token['oauth_token_secret'];

switch ($connection->http_code)
{
case 200:
$url = $connection->getAuthorizeURL($token);
//redirect to Twitter .
header('Location: ' . $url);
break;
default:
echo "Coonection with twitter Failed";
break;
}

}
else //error receiving request token
{
echo "Error Receiving Request Token";
}


}



?>

klo ane blikin pke ini , rediiricthnya ke authorized aplikasi gan, gak ke halaman index ane
×