1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

notifications and outbox edges are no longer availabe.

https://developers.facebook.com/docs/apps/changelog#v2_4_changes

ps.
outbox isn't mentioned in the doc, but read_mailbox deprecation causes outbox deprecation too.
This commit is contained in:
nov 2015-07-13 15:47:23 +09:00 committed by nov
parent 400cdd4ea0
commit 7502807061
7 changed files with 0 additions and 162 deletions

View file

@ -1,17 +0,0 @@
module FbGraph2
class Edge
module Notifications
def notifications(params = {})
notifications = self.edge :notifications, params
notifications.collect! do |notification|
Notification.new notification[:id], notification
end
end
def notification!(params = {})
self.post params, edge: :notifications
end
alias_method :notify!, :notification!
end
end
end

View file

@ -1,12 +0,0 @@
module FbGraph2
class Edge
module Outbox
def outbox(params = {})
threads = self.edge :outbox, params
threads.collect! do |thread|
Thread.new(thread[:id], thread).authenticate self.access_token
end
end
end
end
end

View file

@ -20,9 +20,6 @@ module FbGraph2
include Edge::Likes::LikerContext
include Edge::Movies
include Edge::Music
include Edge::Notifications
include Edge::OpenGraph::Actions
include Edge::Outbox
include Edge::PaymentTransactions
include Edge::Permissions
include Edge::Picture

View file

@ -1,30 +0,0 @@
require 'spec_helper'
describe FbGraph2::Edge::Notifications do
context 'included in User' do
describe '#notifications' do
let(:me) { FbGraph2::User.me('token') }
it 'should return an Array of FbGraph2::Notification' do
notifications = mock_graph :get, 'me/notifications', 'user/notifications', access_token: 'token' do
me.notifications
end
notifications.should be_instance_of FbGraph2::Edge
notifications.should_not be_blank
notifications.each do |notification|
notification.should be_instance_of FbGraph2::Notification
end
end
end
describe '#notification!' do
let(:user) { FbGraph2::User.new('user_id') }
it 'should return true' do
mock_graph :post, 'user_id/notifications', 'success_true', access_token: 'app_token', params: {
href: 'href', template: 'template'
} do
user.authenticate('app_token').notification! href: 'href', template: 'template'
end.should be true
end
end
end
end

View file

@ -1,19 +0,0 @@
require 'spec_helper'
describe FbGraph2::Edge::Outbox do
context 'included in User' do
describe '#outbox' do
let(:me) { FbGraph2::User.me('token') }
it 'should return an Array of FbGraph2::Thread' do
threads = mock_graph :get, 'me/outbox', 'user/outbox', access_token: 'token' do
me.outbox
end
threads.should be_instance_of FbGraph2::Edge
threads.should_not be_blank
threads.each do |thread|
thread.should be_instance_of FbGraph2::Thread
end
end
end
end
end

View file

@ -1,45 +0,0 @@
{
"data": [{
"id": "notif_579612276_373456430",
"from": {
"id": "583017165143721",
"name": "Akira Otaishi"
},
"to": {
"id": "579612276",
"name": "Nov Matake"
},
"created_time": "2014-08-27T18:48:07+0000",
"updated_time": "2014-08-27T18:48:07+0000",
"title": "Akira Otaishi invited you to his event あんしんかんcafe vol.4 ~ネット選挙をめぐるビジネス&セキュリティ~.",
"link": "http://www.facebook.com/events/339815099528481/",
"application": {
"name": "Events",
"id": "141157392619610"
},
"unread": 1
}, {
"id": "notif_579612276_373364015",
"from": {
"id": "631020523647805",
"name": "Shota Kawaminami"
},
"to": {
"id": "579612276",
"name": "Nov Matake"
},
"created_time": "2014-08-27T05:28:07+0000",
"updated_time": "2014-08-27T05:28:07+0000",
"title": "Shota Kawaminami shared your link.",
"link": "http://www.facebook.com/shota.kawaminami/posts/700333850049805",
"application": {
"name": "Links",
"id": "2309869772"
},
"unread": 1
}],
"paging": {
"previous": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&since=1409272999&__paging_token=***",
"next": "https://graph.facebook.com/v2.1/579612276/notifications?limit=5000&until=1408919679&__paging_token=***"
}
}

View file

@ -1,36 +0,0 @@
{
"data": [{
"id": "741737742539677",
"to": {
"data": [{
"id": "579612276",
"name": "Nov Matake"
}, {
"id": "10152167763779825",
"name": "Hayashi Tatsuya"
}]
},
"updated_time": "2014-09-02T03:51:40+0000",
"unread": 0,
"unseen": 0,
"comments": {
"data": [{
"id": "741737742539677_1409625688",
"from": {
"id": "579612276",
"name": "Nov Matake"
},
"message": "ヒゲキョクチョ",
"created_time": "2014-09-02T02:41:28+0000"
}],
"paging": {
"previous": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&since=1409629900&__paging_token=***",
"next": "https://graph.facebook.com/v2.1/741737742539677/comments?limit=25&until=1409625439&__paging_token=***"
}
}
}],
"paging": {
"previous": "https://graph.facebook.com/v2.1/579612276/outbox?limit=25&since=1409629900&__paging_token=***",
"next": "https://graph.facebook.com/v2.1/579612276/outbox?limit=25&until=1403014440&__paging_token=***"
}
}