how can i get user notifications with the new Graph API

后端 未结 4 924
眼角桃花
眼角桃花 2020-12-29 11:20

im making switch to the new Graph API , and i try to replace all the rest api with the new Graph api reading the docs i saw i have some kind of real time function ( im not s

4条回答
  •  旧巷少年郎
    2020-12-29 11:45

    As of Aug 1 2010, there are still no methods for notifications in the new Graph API (I'm not sure if there are any plans for migrating that). You need to use the old REST API for that.

    Use FB.api in place of old REST API. It could be something like this:

    FB.api(
      {
        method: 'notifications.get'
      },
      function(response) {
        alert("Number of unread messages: " + response.messages.unread);
      }
    );
    

提交回复
热议问题