-1

When I click Login with Instagram the url is:

     http://smartouch.hol.es/new/?p=202#https://api.instagram.com/oauth/authorize?client_id=e9a0958abfef4b1bbd2b87c75beb9364&redirect_uri=/success.php&scope=basic&response_type=code

I need to be only:

     https://api.instagram.com/oauth/authorize?client_id=e9a0958abfef4b1bbd2b87c75beb9364&redirect_uri=/success.php&scope=basic&response_type=code

In Google Chrome the link works properly.

The code:

session_start();
if (!empty($_SESSION['userdetails'])) 
{
    header('Location: home.php');
}


      // Display the login button
      $loginUrl = $instagram->getLoginUrl();
      echo "<center><a class=\"button\" href=\"$loginUrl\"><img src='http://smartouch.hol.es/new/wp-content/uploads/2013/05/Untitled-12.png'></a></center>";
    ?>
4

1 回答 1

0

尝试这个:

session_start();
if (!empty($_SESSION['userdetails'])) 
{
header('Location: home.php');
}

?>
 <center><a class="button" href="<?php echo $instagram->getLoginUrl(); ?>"><img src="http://smartouch.hol.es/new/wp-content/uploads/2013/05/Untitled-12.png"></a></center>

另外,如果您使用文本而不是 img 会发生什么?

于 2013-06-08T11:03:16.790 回答