How to get the top URL from a Facebook application?

后端 未结 4 1015
青春惊慌失措
青春惊慌失措 2021-01-25 15:02

How can I get the top URL (Facebook\'s address) in my iframe application?

Is there a good solution on that?

4条回答
  •  迷失自我
    2021-01-25 15:25

    If you can wait for first load, you can use jQuery:

    $(document).ready(function()
    {
        var myurl = window.location.pathname;
        $.get("test.php", { url: myurl } );
    });
    

提交回复
热议问题