php - https://stackexchange.com/oauth/access_token not redirecting back to my redirect_uri -
i trying implement stackexchange using oauth 2.0 , able code but, when trying access_token through below code
<?php if(isset($_get['code'])) { ?> <form method="post" action="https://stackexchange.com/oauth/access_token" enctype="application/x-www-form-urlencoded"> <input type="hidden" name="client_secret" value="aaaaaaaaaaaaaaaaaaaaaaaa" /> <input type="hidden" name="code" value="<?php echo $_get['code'];?>" /> <input type="hidden" name="client_id" value="0000" /> <input type="hidden" name="redirect_uri" value="http%3a%2f%2fmysite.com%2fmypage.php" /> <input type="submit" name="submit" value="stack" /> </form> <a href="https://stackexchange.com/oauth/access_token?client_id=0000&client_secret=aaaaaaaaaaaaaaaaaaaaaaaa&code=<?php echo $_get['code'];?>&redirect_uri=http%3a%2f%2fmysite.com%2fmypage.php">abcd</a> <?php } ?>
when click on anchor tag nothing happens stays on may page only. , when click on submit button of form, access_token displayed on "https://stackexchange.com/oauth/access_token" not redirecting redirect_uri. if can guid me, full, thank you.
Comments
Post a Comment