Can't send FB Notifications with new API

前端 未结 3 485
梦如初夏
梦如初夏 2021-02-08 10:02

Really need some help with this one!

I\'m trying to send notifications from a canvas app using the new notifications API but I keep getting the following exception:

相关标签:
3条回答
  • 2021-02-08 10:38

    I just ran into this too and this is how I solved it, but this may not be relevant to you as you seem certain yours is a Canvas app. Mine is an app that mostly runs off Facebook, but has Facebook integration hooks that means users can authorise my Facebook App and then receive updates about interesting events via the Facebook framework.

    I went to edit my App settings in the Facebook Developers app, look on the Settings->Basic page near the bottom. I only had "Website With Facebook Login" checked. I checked "App on Facebook" and this gave me a "Canvas Page" and various other settings. With these filled in and saved, the POST to uid/notifications worked immediately.

    Incidentally, going to apps.facebook.com/myappnamehere fails because it redirects to https and the request to my site fails because my SSL isn't set up right, but this didn't prevent notifications being sent under that apps credentials.

    0 讨论(0)
  • 2021-02-08 10:41

    Recently, I was facing this same issue and I found that Facebook Web Games are formally known as Facebook Canvas.

    So, Just create an Facebook game configuration under Settings->Basic page (You will see add button at the bottom of this page) and your API will start sending notifications.

    0 讨论(0)
  • 2021-02-08 10:41

    1:\ Go to developer.facebook.com

    2:\ Go to your app Settings \ Basic

    3:\ Add new platform from plus at button bottom of the page

    4:\ Choose Facebook Canvas

    now you may need to fill form with your url

    That's it

    0 讨论(0)
提交回复
热议问题