I tried to work this from a number of angles but ultimately ended up contacting Facebook (not a simple task). The issue starts here:
Policy terms Section 4 Item 8:
- Don’t build an app whose primary purpose is to redirect people off of Facebook.
https://developers.facebook.com/policy/1
And here’s a link to a video they sent me to go through. In order to use the notifications system, you need to be using a canvas app.
https://developers.facebook.com/docs/apps/review/canvasredirect
I looked into the concept of posting an iframe of Discourse into the canvas and running it that way but that has some issues with functionality on the Discourse side as well as being frowned upon by FB.
What they eventually told me:
We highly discourage pulling an existing site into an app on Facebook. It’s easy for links within the iframe application to lead off of Facebook and will then put you in violation of policy.
They seem dedicated to keeping folks on FB and leading developers to building apps specifically for FB as opposed to repurposing code. I know there are services and sites out there that do this exact process but the two or three that I talked to said they had been put on a “watch list” by FB and are likely to be shut down soon.