tags:

views:

314

answers:

0

I'm trying to work out a Facebook-friendly way to do the following:

1) Click on a link

2) Open a URL in a new window

3) Go to a Facebook app URL

Both actions need to happen on the same click. Outside of Facebook, I'd just open a new window with an onclick with javascript. Facebook doesn't allow that (shocking).

I've also tried to open one link with target="_blank" and go to the other page via FBJS like:

<a onclick="document.setLocation('http://www.twitter.com');" href="http://google.com" target="_blank">

This does work with an EXTERNAL URL as an argument to setLocation(), but NOT with a Facebook URL (ie, apps.facebook.com/something). I have no idea why that limitation would be there, but FB's done stranger things.

Yet another idea I've not tried is to include the content for the appUrl on the same page and simply "swap" content when the button is clicked. Feels super kludgy, though. My ultimate fallback is to move this functionality to a canvas page where I can iFrame the functionality.

Any ideas?

related questions