2016-04-11 15 views
0
// Create our Application instance (replace this with your appId and secret). 
        $facebook = new Facebook(array(
         'appId' => 'XXXXXXXXXXXXXX', 
         'secret' => 'XXXXXXXXXXXXXXXXXXXX', 
        )); 

        $facebook->api("/$user_id/notifications/", 'post', array(
         'access_token' => 'XXXXXXXXXXXXXXXXXXXXXXXXX', 
         'template' => "MSG", 
         'href' => "www.google.com", 
        )); 

を送信できません「という致命的なエラー:キャッチされないOAuthException:(#200)アプリ投げインストールしていないユーザーに通知を送信できません」FacebookのSDK - #200:通知に

エラーの後に発生ユーザーがアプリケーションのパーミッションを削除すると、ユーザーがアプリケーションを削除したときを検出する手段があるか、エラーを無視しますか?

+0

_ _ - あなたは例外が致命的なエラーを引き起こすしたくない場合は、当然のことながら、それらを_catch_する必要があります。 – CBroe

答えて

1

FacebookにはFacebookのアプリをアンインストールしたときに発生するウェブフックがあります。ドキュメントDetecting when people uninstall appsから

:「?またはエラーを無視」

You can enable a deauthorize callback via the App Dashboard . Just go to your app, then choose the Settings menu, and finally the Advanced tab. A text field is provided for the Deauthorize Callback URL.

Whenever a user of your app de-authorizes it, this URL will be sent an HTTP POST containing a signed request . Read our guide to parsing the signed request to see how to decode this to find out the user ID that triggered the callback.

関連する問題