duanchi5078 2016-04-11 18:34
浏览 45

Facebook SDK - #200:无法发送通知

// 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",
                    ));

"Fatal error: Uncaught OAuthException: (#200) Cannot send notifications to a user who has not installed the app thrown"

Error occurs after the User remove permissions of the application, there is some means of detecting when the User remove the application, or ignore the error?

  • 写回答

1条回答 默认 最新

  • douhan8430 2016-04-11 18:54
    关注

    Facebook has a webhook that is triggered when a user uninstalls their Facebook app.

    From the documentation 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.

    评论

报告相同问题?

悬赏问题

  • ¥15 SQL Server下载
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?
  • ¥15 python爬取bilibili校园招聘网站
  • ¥30 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求