title: Prevent IOS to shutdown an app when it app switch to facebook for login and permission request
body: <p>I am really stuck on this problem and I need your help!
  I'm doing an ipad game with unity and the social network plugin from prime31.</p>
  
  <p>The situation:</p>
  
  <p>When you arrive to the end of level, the game gives you your score and ask if you want to submit it to facebook. If you do, In my script I've done a system that checks if you are logged in, if you aren't it ask you to login and then the system checks if the app has the publish permissions and if not it ask you the permission. If all theses if are true it posts a message to your wall straight. So hopefully the login/asking part needs to be done only once.</p>
  
  <p>The problem:</p>
  
  <p>When the ipad swap between the game and the facebook app to login, the ipad shutdown the game for saving memory. I've tried to reduce the scene, but it's hard to reduce it more than it is. So I thought maybe I should open that facebook login and authorisation inGame. For that I tried working with this:</p>
  
  <pre><code>setSessionLoginBehavior(FacebookSessionLoginBehavior.ForcingWebView);
  </code></pre>
  
  <p>And it does exactly what I want, it opens a small window in game, doesn't crash all good really. But the problem, in this solution, is that it only works for the login, and when I ask the publish permission it switches back to the facebook app to ask the permission and therefore crashes.
  After more research, it seems that it's not doable to control the ask permission behavior.
  So back to square one, how can I prevent IOS to shutdown my game while the user connects to facebook. I'm still looking to reduce the scene.</p>
  
  <p>I heard of using the app url and sending data for the app (my game) launch after leaving the facebook app and therefore ask the ipad to relaunch the app at a specific scene. But that would be really the last solution because it's going to take a lot of rework to make that happened.</p>
  
  <p>If you have another suggestions to work around this problem I'm up for it. All I need is login -> ask for publish permissions -> post and come back to the end of level screen of my game.</p>
  
  <p>Thanks for the help</p>