I'm trying to use Google Api to get a list of youtube channels the users subscribed to using this file https://github.com/google/google-api...er-example.php and setting $client_id,$client_secret and $redirect_ur. The redirect url is another webpage that stores the code in a variable and it's the same url in the google developer app settings. after running the page I get redirected to the url that looks like this
Expand|Select|Wrap|Line Numbers
- http://mywebsite.com/google/test.php?code=code here
- $code = $_REQUEST['code'];
Expand|Select|Wrap|Line Numbers
- $data =file_get_contents('https://www.googleapis.com/youtube/v3/subscriptions?part=snippet
- &maxResults=50&access_token='.$code.'&mine=true&key=My API Key Here');
- var_export($data)