title: How to do any type of info sharing from within a Facebook tab?
body: <p>Firstly apologies for the length of this question, and for asking about the Facebook API (seemingly one of the most inconsistent API's in the world...).</p>
  
  <p>The Situation:
  We're producing an Facebook product 'community' - type page for our client, featuring standard Facebook tabs, one of which embeds a Flash game. At the end of this game we'd like to be able to share the users' final score via a wall post, and also invite friends to challenge the score.</p>
  
  <p>Firstly - the client is insistent that the game appears on a tab within the page, so moving this all to an application (for example, <code>apps.facebook.com</code>) is sadly not an option. I'm aware you can embed an application on tab instead of static FMBL, but I have tried this and the result is essentially the same or fails (the tab imposes stringent restrictions on what can be rendered, enforcing the use of FBML and negating the <code>FB:Iframe</code> tag for starters).</p>
  
  <p>Currently we're embedding this game on a static FBML tab, using the <code>fb:swf</code> tag and FBJS-bridge to enable some simple interaction on the tab (navigating to a new window, etc.). We've also tried the FBJS embed approach, and making the game into an application and adding that as a tab on the page. In all cases, there seems to be no way to get the UID of the viewing user when in the tab environment (despite the fact that they must be logged in to see the page in the first place). The game itself is Flash ActionScript 3, and I've got the option to use the Facebook ActionScript 3 API. Using this approach the best process I've managed to come up with so far is outlined below:</p>
  
  <p>0) Create a separate application with the sole purpose of dealing with score sharing, etc.</p>
  
  <p>1) User Clicks 'Share my score' at the end of the game on the TAB page.</p>
  
  <p>2) <a href="http://en.wikipedia.org/wiki/SWF" rel="nofollow noreferrer">SWF</a> does the standard Facebook 'login to application' request by opening a new tab.</p>
  
  <p>3) The user confirms this action and closes the new window.</p>
  
  <p>4) THe user clicks yet again within the Flash game to confirm that they have logged in.</p>
  
  <p>5) SWF performs the <code>facbook.verifySession()</code> and opens yet another window requesting permission to post on the users' wall.</p>
  
  <p>6) The user confirms this and is once again taken back to the game.</p>
  
  <p>7) SWF listens for 'FacebookEvent.PERMISSIONS_CHANGED' and posts to the wall once this is confirmed.</p>
  
  <p>Since there is no way to verify whether the user has added the application when loading within it a tab, it's likely they would have to follow this process every time they wanted to post a result from the game, which is hideous. The main problem seems to be that any <a href="http://en.wikipedia.org/wiki/Rich_Internet_application" rel="nofollow noreferrer">RIA</a> residing on a Facebook tab receives no useful information within the OAuth token for that tab, in contrast to an RIA sitting on <code>apps.facebook.com</code> which gets all the information I need within the request headers.</p>
  
  <p>Put simply, I need the simplest, most straightforward way to make a Facebook wall post from within a Facebook Product page tab, whether using FMBL, FBJS, ActionScript 3, ASP or any combination thereof.</p>
  
  <p>I've seen this: <a href="https://stackoverflow.com/questions/3674923/facebook-share-or-publish-dialogue-from-page-tab-closed">https://stackoverflow.com/questions/3674923/facebook-share-or-publish-dialogue-from-page-tab-closed</a> which is indeed the same question I'm asking, but the answer is unclear, and it doesn't seem that it would solve my problem.</p>