Search code examples
javascriptfacebookurlfbjs

how to get the current URL in fbjs?


I want to get the current URL in fbjs. I have used this

window.location

However, this doesnt work.

Can anyone please help me ? Thanks.

- ahsan


Solution

  • well, heres how I solved it :

    Using PHP, we can get the page id and the app id.

    Using FQL, we can get the page title.

    Using these 3 values we can recreate the current URL (I am working on a fanpage tab)

    Hope this helps :)

    - ahsan