문제

I tried calling:

Application.ExternalEval("UnityObject2.instances[0].getUnity().SendMessage('GameObjectName', 'SomeFunctionHere', document.URL);");

Which works great, but it could only retrieve the frame's url (it is a very long random html link) instead of the outer top most like https://apps.facebook.com/appnamehere. I also tried window.top.location.href but it gives me a security error since it wasn't allowed.

I need to process the url before I even init, so I cannot use fb's deeplink or anything like that. Any ideas on how to get the url? I'm using 5.0.4 of the SDK on Facebook Canvas.

도움이 되었습니까?

해결책

Because of cross-domain security, it isn't possible to get the top url.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top