Facebook App Invite Dialog is not working
Did the test user already installed the app? If so, it's expected that they don't receive App Invite notifications.
You can read more in the documentation on App Invites:
If the person already has the app installed, they will not receive a push notification.
Can you check if this might be the situation?
Your code is fine and this feature will actual work when you publish your app because some Facebook integration require approval before usage. Submit your app for approval in Status And Review section