PHP OAuth access token trouble

    <?php

require ('twitch_interface.php');

$interface = new twitch;

    if(isset($_GET['code'])){

        $user_code = $_GET['code'];
        $authcode =  $interface->generateToken($user_code);
        echo $user_code . '<br>' . $authcode . '<br>';

    }

?>

<body>
    <a href=<?php echo($interface->generateAuthorizationURL(array('user_read', 'user_blocks_edit', 'user_subscriptions', 'user_follows_edit'))); ?>>
        connect
    </a>

Output:

w6vbsar14yrfj7ryxmk48ou8r7ct6v
Array
connect

Not sure that the problem is but I have ahd no luck.

The generateToken method returns an associative array, which can only be printed using print_r, not just print.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.