【发布时间】:2014-06-03 19:02:23
【问题描述】:
我愿意使用 facebook graph api 将用户的通知标记为已读,但我现在开始怀疑这是否可能。这是我现在正在尝试的,这是我在 stackoverflow 上的this question 中找到的解决方案。
$http({method: 'POST', url: 'https://graph.facebook.com/' + item.id + '?unread=0'}).
success(function(data, status, headers, config) {
// this callback will be called asynchronously
// when the response is available
deferred.resolve(status);
}).
error(function(data, status, headers, config) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
当然,item.id 是通知的 id。
我对我的 http 请求使用 angular,但我也不介意其他方法,只是 angular 对我来说是最简单的。我也期待听到有关如何将通知标记为已读的任何想法,我不喜欢任何方式,只是希望它以某种方式发生。
【问题讨论】:
标签: angularjs facebook-graph-api notifications http-request