title: Facebook SDK inside Firefox (callback from content window to window)
body: <p>I’m developing a Firefox addon and I would like to use facebook sdk in it. One of the features that I like to use is the callback that is triggered when a like button is pressed. In detail I mean this one:
  FB.Event.subscribe('edge.create', function() {dump("like pressed"); });</p>
  
  <p>Currently I’m doing it this way. I open a layer in the current window with an iframe. That iframe contains the facebook api + the features that I would like to use. My problem is that I can’t call my addons functions from the inside of that iframe. What I would like to do would be something like:
  FB.Event.subscribe('edge.create', function() {fbClass.like(); });</p>
  
  <p>In my mind I’ve one idea. I think to make it safe it would be ok to create an empty hidden div container in that iframe, attach an eventlistener to it and fill it with json. Then use firefox safe json loader to receive it. </p>
  
  <p>Any other idea how I could accomplish that one without creating a security issue?
  I tried porting the FB api to FF but it leaded into a waste of time. Sure I got some features work but it’s that complex to debug it and in case if the api changes I would have to do it again. So I think the iframe way would be a much better one.</p>