当前位置: 动力学知识库 > 问答 > 编程问答 >

Handling app restart on Facebook app invite

问题描述:

Problem:

When calling Facebook app invite API, the app switches out to Facebook's invite dialog. And when user completes the process and returns back to the app, it has chance that OS might close the app already and it got restarted. (Happen very often on low-end device like iPad2, also if the app itself is game that hog some memory)

It is look like that the game will wait for callback from Facebook API, to see if invite was succeed (callback that says something like "didComplete"=1), cancelled or error. But then if the app restarts, callback will never get to the app. But invite was actually sent out and appears on my friend's notification.

Question:

  • I want to be able to know, somehow even if app restarted, was invite actually succeed or not? Maybe there is a way to retrieve lost callback somewhere?

Note:

  • This is quite similar to handling restart in Facebook Login, but in that case, isLoggedIn or currentAccessToken status from SDK stays intact after app restarted, so the app know that login was succeed and can continue. In this case, we don't have anything to check for.

  • I'm working on game built with Facebook Unity3D which then build to Android and iOS, which in turn uses Facebook Android/iOS SDK as well. So I'm also including android/iOS SDK tag into this question.

分享给朋友:
您可能感兴趣的文章:
随机阅读: