after spending whole day searching , trying ways implement this, end asking here, hope i'll want achieve. know issue not question still bear me.
problem - using google oauth contacts of user, setup, flow of application is
user clicks on button -> modal appears has iframe (gmail_connect.php) has link user authorized -> when clicked on link opening popup in authorizing user -> when user authorized -> user redirected contacts.php in popup window -> have written js in contacts.php close , reload iframe window opened contacts.php parameters.
following 2 lines have written in contacts.php closes itself(popup window) , sets location of parent iframe url popup window has.
<?php $oauth_verifier = $_get['oauth_verifier']; $oauth_token = $_get['oauth_token']; ?> <script> window.opener.location.href = 'contacts.php?oauth_verifier=<?= $oauth_verifier?>&oauth_token=<?= $oauth_token;?>'; window.close(); <script>
the problem 404 error, , thats obvious because when check url of iframe, url is
<a href="http://localhost/contacts.php%3foauth_verifier=f2hktklnseza7-2hc1ii-7kq&oauth_token=4%252filq0z3ivykfsdpuoqqe_rgbh2zbi">referring page</a>
you can see %3f
instead of ?
, &
instead of &
why happening?
Comments
Post a Comment