0

I am building a web game with a Facebook app. The user may receive invitations and other notifications from the app. However, the notifications doesn't disappear after the user follow that link and go to the canvas page. My question is, how can I know if the user followed the link and delete that notification? Is it possible with javascript?

darklord
  • 5,077
  • 12
  • 40
  • 65

1 Answers1

1

Because you control the URL the user arrives at (the href parameter of the call to create the notification, documented here: https://developers.facebook.com/docs/games/notifications/#impl) , the simplest way to see if the user came from a notification is to use a query string parameter which denotes it was from a notification

This answer shows how to read query string parameters in Javascript: How can I get query string values in JavaScript?

Community
  • 1
  • 1
Igy
  • 43,710
  • 8
  • 89
  • 115