I’m trying to use window.top.location as the link property when sharing content from an application using the JS SDK. This is an iframe canvas app.
When I send in window.top.location I get the following error:
Error: Permission denied to access property ‘toJSON’ Source File:
http://connect.facebook.net/en_US/all.js Line: 9
I also tried to pass in the href property of window.top.location but I get a similar error in my own code:
Error: Permission denied to access property ‘herf’ Source File:
http://localhost:2888/Scripts/quickView.js Line: 65
I’m assuming this is a XSS issue, but I was wondering if there was a way around it. I could always pass the canvas page url to the client from the server, but I would like to see if we can get this working instead.
Appreciate your thoughts on this.
A little late on the follow up, but Shawn eluded to the correct answer. The issue is only present when running the application locally. In a hosted environment I can access this property without issue.