# Facebook - External Interface Security Error

**URL:** <https://forum.kirupa.com/t/facebook-external-interface-security-error/307648>\
**Category:** flash\
**Created:** [April 7, 2010, 3:33pm UTC](https://forum.kirupa.com/t/facebook-external-interface-security-error/307648 "2010-04-07T15:33:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Digitalosophy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/digitalosophy/32/1114_2.png) [@Digitalosophy](https://forum.kirupa.com/u/Digitalosophy)\
**Post date:** [April 7, 2010, 3:33pm UTC](https://forum.kirupa.com/t/facebook-external-interface-security-error/307648/1 "2010-04-07T15:33:54Z")

</div>

Hey guys,

I am trying to make an external interface call on widgets I am creating to get the domain for in/out of network stats.

```auto

urlPath = ExternalInterface.call("window.location.hostname.toString");

```

Of course this is throwing an error

```auto

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller XXX cannot access http://www.facebook.com/#!/XXX?ref=profile.
    at flash.external::ExternalInterface$/_initJS()
    at flash.external::ExternalInterface$/call()
    at XXX
    at XXX

```

From what I am reading an allowscriptaccess needs to be set to always, which I can’t do because there isn’t embed code that is sent to Facebook during a share so I don’t have control over that. I have allowed access to facebook and still have no luck.

Any ideas? I’m kinda stuck here.

Thanks all
