First of thanks for the spring social popup example code. It's excellent.
I currently have some, what appears to be identical type of code, but the window.opener portion of the javascript never fires so the popup window never closes after the connect completes. Driving me nuts. Just throwing this out there to see if others have some ideas what could be causing it not to fire. I'm guessing there is some other javascript library interfering (but that'll take me some to track down if that's the case.) The form submits to the popup up window perfectly, yet you'll never see the window.opener alert fire.
My preconnect in my FacebookConnectedInterceptor also fires and does the following:Code:<script> if(window.opener) { alert("yes if window.opener fires NEVER DOES!!!"); window.opener.location.reload(false); window.close(); } </script> <c:url value="/social/connect/facebook" var="connectUrl"/> <form action="${connectUrl}" method="POST" id="socialConnectForm"> <input type="hidden" name="scope" value="publish_stream,offline_access,....{removed rest for brevity}" /> <button id="fbConnect" type="submit">Connect</button> </form> <script> j$(document).ready(function() { j$("#fbConnect").click(function(event){ event.preventDefault(); window.open("", "connectWindow", "width=600,height=400"); var cTP = j$(event.currentTarget).parent(); cTP[0].setAttribute("target", "connectWindow"); cTP[0].submit(); }); }); </script>
parameters.set("display", "popup");


Reply With Quote
