I am making a manual login flow with facebook without js sdk i have an iframe to get user approval it works fine and returns short-lived access token withn url but the problem when i want to get the url like iframe.src
it returns the src i provided not redirected and which contains facebooks response.The question is how i can get redirected current url of an iframe .
i tried
iframe.location.href
but it seems iframe doesnt have dom inside, and location is undefined.
Asked
Active
Viewed 5,223 times
2

nikoss
- 3,254
- 2
- 26
- 40
-
Why not using the facebook javascript SDK ? Also, share code on how are you doing it through an iframe. – coding_idiot Aug 04 '15 at 17:57
-
that's a weird way of doing it.. – Nitesh Oswal Aug 04 '15 at 18:06
-
Try `document.referrer` see http://stackoverflow.com/questions/3420004/access-parent-url-from-iframe – Daniel Lizik Aug 04 '15 at 19:34
-
nope it returns wrong value i tried already – nikoss Aug 04 '15 at 19:54
1 Answers
2
I found out i can use frame.contentWindow.location
after it returns to my site

nikoss
- 3,254
- 2
- 26
- 40