Skip to main content
deleted 9 characters in body
Source Link
rene
  • 2.8k
  • 2
  • 17
  • 35

I am trying to implement Stack Exchange using oAuth 2.0. I am able to get CODE but, when I try to get access_token through this 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 I click on anchor tag nothing happens, it just stays on may page only.

When I submit the form, ACCESS_TOKEN is displayed on
https://stackexchange.com/oauth/access_token
but its not redirecting back to my redirect_uri. 

If anyone can guide me, it will be very help full, thank youhelpful.

I am trying to implement Stack Exchange using oAuth 2.0. I am able to get CODE but, when I try to get access_token through this 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 I click on anchor tag nothing happens, it just stays on may page only.

When I submit the form, ACCESS_TOKEN is displayed on
https://stackexchange.com/oauth/access_token
but its not redirecting back to my redirect_uri. If anyone can guide me, it will be very help full, thank you.

I am trying to implement Stack Exchange using oAuth 2.0. I am able to get CODE but, when I try to get access_token through this 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 I click on anchor tag nothing happens, it just stays on may page only.

When I submit the form, ACCESS_TOKEN is displayed on
https://stackexchange.com/oauth/access_token
but its not redirecting back to my redirect_uri. 

If anyone can guide me, it will be very helpful.

https://stackexchange.com/oauth/access_token not redirecting back to my redirect_uri

I am trying to implement stackexchangeStack Exchange using oAuth 2.0 , i. I am able to get CODE but, when i am tryingI try to get access_tokenaccess_token through belowthis 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
}
?>
<?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 iI click on anchor tag nothing happens, it just stays on may page only. And when i click on

When I submit button ofthe form, ACCESS_TOKENACCESS_TOKEN is displayed on "https://stackexchange.com/oauth/access_token" but
https://stackexchange.com/oauth/access_token
but its not redirecting back to my redirect_uriredirect_uri. If anyone can guidguide me, it will be very help full, thank you.

https://stackexchange.com/oauth/access_token not redirecting back to my redirect_uri

I am trying to implement stackexchange using oAuth 2.0 , i am able to get CODE but, when i am trying to get 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 i click on anchor tag nothing happens it just stays on may page only. And when i click on submit button of form, ACCESS_TOKEN is displayed on "https://stackexchange.com/oauth/access_token" but its not redirecting back to my redirect_uri. If anyone can guid me, it will be very help full, thank you.

/oauth/access_token not redirecting back to my redirect_uri

I am trying to implement Stack Exchange using oAuth 2.0. I am able to get CODE but, when I try to get access_token through this 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 I click on anchor tag nothing happens, it just stays on may page only.

When I submit the form, ACCESS_TOKEN is displayed on
https://stackexchange.com/oauth/access_token
but its not redirecting back to my redirect_uri. If anyone can guide me, it will be very help full, thank you.

Source Link

https://stackexchange.com/oauth/access_token not redirecting back to my redirect_uri

I am trying to implement stackexchange using oAuth 2.0 , i am able to get CODE but, when i am trying to get 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 i click on anchor tag nothing happens it just stays on may page only. And when i click on submit button of form, ACCESS_TOKEN is displayed on "https://stackexchange.com/oauth/access_token" but its not redirecting back to my redirect_uri. If anyone can guid me, it will be very help full, thank you.