fb_graph2 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/VERSION +1 -1
  4. data/fb_graph2.gemspec +2 -1
  5. data/lib/fb_graph2/achievement.rb +3 -1
  6. data/lib/fb_graph2/application.rb +4 -0
  7. data/lib/fb_graph2/collection.rb +1 -1
  8. data/lib/fb_graph2/edge/albums.rb +5 -0
  9. data/lib/fb_graph2/edge/blocked.rb +7 -2
  10. data/lib/fb_graph2/edge/comments.rb +1 -1
  11. data/lib/fb_graph2/edge/feed.rb +1 -1
  12. data/lib/fb_graph2/edge/notifications.rb +6 -0
  13. data/lib/fb_graph2/edge/photos.rb +1 -1
  14. data/lib/fb_graph2/edge/shared_posts.rb +1 -1
  15. data/lib/fb_graph2/edge/videos.rb +1 -1
  16. data/lib/fb_graph2/page.rb +6 -1
  17. data/lib/fb_graph2/page_category.rb +7 -0
  18. data/lib/fb_graph2/user.rb +1 -0
  19. data/spec/fb_graph2/application_spec.rb +23 -0
  20. data/spec/fb_graph2/collection_spec.rb +11 -0
  21. data/spec/fb_graph2/edge/achievements_spec.rb +18 -0
  22. data/spec/fb_graph2/edge/activities_spec.rb +18 -0
  23. data/spec/fb_graph2/edge/admins_spec.rb +40 -0
  24. data/spec/fb_graph2/edge/albums_spec.rb +30 -0
  25. data/spec/fb_graph2/edge/blocked_spec.rb +60 -0
  26. data/spec/fb_graph2/edge/books_spec.rb +18 -0
  27. data/spec/fb_graph2/edge/events_spec.rb +18 -0
  28. data/spec/fb_graph2/edge/friend_lists_spec.rb +18 -0
  29. data/spec/fb_graph2/edge/friends_spec.rb +18 -0
  30. data/spec/fb_graph2/edge/groups_spec.rb +18 -0
  31. data/spec/fb_graph2/edge/home_spec.rb +18 -0
  32. data/spec/fb_graph2/edge/interests_spec.rb +18 -0
  33. data/spec/fb_graph2/edge/invitable_friends_spec.rb +18 -0
  34. data/spec/fb_graph2/edge/likes_spec.rb +4 -4
  35. data/spec/fb_graph2/edge/links_spec.rb +18 -0
  36. data/spec/fb_graph2/edge/milestones_spec.rb +18 -0
  37. data/spec/fb_graph2/edge/movies_spec.rb +18 -0
  38. data/spec/fb_graph2/edge/music_spec.rb +18 -0
  39. data/spec/fb_graph2/edge/notifications_spec.rb +29 -0
  40. data/spec/fb_graph2/edge/permissions_spec.rb +18 -0
  41. data/spec/fb_graph2/edge/picture_spec.rb +16 -0
  42. data/spec/fb_graph2/edge/pokes_spec.rb +18 -0
  43. data/spec/fb_graph2/edge/posts_spec.rb +18 -0
  44. data/spec/fb_graph2/edge/promotable_posts_spec.rb +18 -0
  45. data/spec/fb_graph2/edge/scores_spec.rb +18 -0
  46. data/spec/fb_graph2/edge/shared_posts_spec.rb +18 -0
  47. data/spec/fb_graph2/edge/statuses_spec.rb +18 -0
  48. data/spec/fb_graph2/edge/television_spec.rb +18 -0
  49. data/spec/fb_graph2/edge/videos_spec.rb +28 -0
  50. data/spec/fb_graph2/request_filter/authenticator_spec.rb +25 -0
  51. data/spec/fb_graph2/request_filter/debugger_spec.rb +33 -0
  52. data/spec/fb_graph2/user_spec.rb +1 -1
  53. data/spec/fb_graph2/util_spec.rb +19 -0
  54. data/spec/mock_json/application/app.json +15 -0
  55. data/spec/mock_json/page/admins.json +11 -0
  56. data/spec/mock_json/page/block_succeeded.json +3 -0
  57. data/spec/mock_json/page/blocked.json +11 -0
  58. data/spec/mock_json/page/milestones.json +19 -0
  59. data/spec/mock_json/page/promotable_posts.json +67 -0
  60. data/spec/mock_json/post/shared_posts.json +50 -0
  61. data/spec/mock_json/success_true.json +3 -0
  62. data/spec/mock_json/user/achievements.json +40 -0
  63. data/spec/mock_json/user/activities.json +36 -0
  64. data/spec/mock_json/user/albums.json +23 -0
  65. data/spec/mock_json/user/books.json +11 -0
  66. data/spec/mock_json/user/events.json +16 -0
  67. data/spec/mock_json/user/friend_lists.json +98 -0
  68. data/spec/mock_json/user/friends.json +18 -0
  69. data/spec/mock_json/user/groups.json +16 -0
  70. data/spec/mock_json/user/home.json +61 -0
  71. data/spec/mock_json/user/interests.json +41 -0
  72. data/spec/mock_json/user/invitable_friends.json +27 -0
  73. data/spec/mock_json/user/links.json +45 -0
  74. data/spec/mock_json/user/movies.json +11 -0
  75. data/spec/mock_json/user/music.json +45 -0
  76. data/spec/mock_json/user/notifications.json +111 -0
  77. data/spec/mock_json/user/permissions.json +114 -0
  78. data/spec/mock_json/user/picture.json +6 -0
  79. data/spec/mock_json/user/pokes.json +17 -0
  80. data/spec/mock_json/user/posts.json +48 -0
  81. data/spec/mock_json/user/scores.json +14 -0
  82. data/spec/mock_json/user/statuses.json +15 -0
  83. data/spec/mock_json/user/television.json +11 -0
  84. data/spec/mock_json/user/videos.json +41 -0
  85. data/spec/spec_helper/mock_graph.rb +1 -1
  86. data/spec/spec_helper.rb +7 -0
  87. metadata +84 -5
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Music do
4
+ context 'included in User' do
5
+ describe '#music' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Page' do
8
+ pages = mock_graph :get, 'me/music', 'user/music', access_token: 'token' do
9
+ me.music
10
+ end
11
+ pages.should_not be_blank
12
+ pages.each do |page|
13
+ page.should be_instance_of FbGraph2::Page
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,29 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Notifications do
4
+ context 'included in User' do
5
+ describe '#notifications' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Notification' do
8
+ notifications = mock_graph :get, 'me/notifications', 'user/notifications', access_token: 'token' do
9
+ me.notifications
10
+ end
11
+ notifications.should_not be_blank
12
+ notifications.each do |notification|
13
+ notification.should be_instance_of FbGraph2::Notification
14
+ end
15
+ end
16
+ end
17
+
18
+ describe '#notification!' do
19
+ let(:user) { FbGraph2::User.new('user_id') }
20
+ it 'should return true' do
21
+ mock_graph :post, 'user_id/notifications', 'success_true', access_token: 'app_token', params: {
22
+ href: 'href', template: 'template'
23
+ } do
24
+ user.authenticate('app_token').notification! href: 'href', template: 'template'
25
+ end.should be true
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Permissions do
4
+ context 'included in User' do
5
+ describe '#permissions' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Struct::Permission' do
8
+ permissions = mock_graph :get, 'me/permissions', 'user/permissions', access_token: 'token' do
9
+ me.permissions
10
+ end
11
+ permissions.should_not be_blank
12
+ permissions.each do |permission|
13
+ permission.should be_instance_of FbGraph2::Struct::Permission
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Picture do
4
+ context 'included in User' do
5
+ describe '#picture' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it do
8
+ mock_graph :get, 'me/picture', 'user/picture', access_token: 'token', params: {
9
+ redirect: false
10
+ } do
11
+ me.picture
12
+ end.should be_instance_of FbGraph2::Struct::Picture
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Pokes do
4
+ context 'included in User' do
5
+ describe '#pokes' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Struct::Poke' do
8
+ pokes = mock_graph :get, 'me/pokes', 'user/pokes', access_token: 'token' do
9
+ me.pokes
10
+ end
11
+ pokes.should_not be_blank
12
+ pokes.each do |poke|
13
+ poke.should be_instance_of FbGraph2::Struct::Poke
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Posts do
4
+ context 'included in User' do
5
+ let(:me) { FbGraph2::User.me('token') }
6
+ describe '#posts' do
7
+ it 'should return an Array of FbGraph2::Post' do
8
+ posts = mock_graph :get, 'me/posts', 'user/posts', access_token: 'token' do
9
+ me.posts
10
+ end
11
+ posts.should_not be_blank
12
+ posts.each do |post|
13
+ post.should be_instance_of FbGraph2::Post
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::PromotablePosts do
4
+ context 'included in Page' do
5
+ describe '#promotable_posts' do
6
+ let(:page) { FbGraph2::Page.new('page_id').authenticate('page_token') }
7
+ it 'should return an Array of FbGraph2::Post' do
8
+ posts = mock_graph :get, 'page_id/promotable_posts', 'page/promotable_posts', access_token: 'page_token' do
9
+ page.promotable_posts
10
+ end
11
+ posts.should_not be_blank
12
+ posts.each do |post|
13
+ post.should be_instance_of FbGraph2::Post
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Scores do
4
+ context 'included in User' do
5
+ describe '#scores' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Struct::Score' do
8
+ scores = mock_graph :get, 'me/scores', 'user/scores', access_token: 'token' do
9
+ me.scores
10
+ end
11
+ scores.should_not be_blank
12
+ scores.each do |score|
13
+ score.should be_instance_of FbGraph2::Struct::Score
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::SharedPosts do
4
+ context 'included in Post' do
5
+ describe '#shared_posts' do
6
+ let(:post) { FbGraph2::Post.new('post_id').authenticate('token') }
7
+ it 'should return an Array of FbGraph2::Post' do
8
+ posts = mock_graph :get, 'post_id/sharedposts', 'post/shared_posts', access_token: 'token' do
9
+ post.shared_posts
10
+ end
11
+ posts.should_not be_blank
12
+ posts.each do |post|
13
+ post.should be_instance_of FbGraph2::Post
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Statuses do
4
+ context 'included in User' do
5
+ let(:me) { FbGraph2::User.me('token') }
6
+ describe '#statuses' do
7
+ it 'should return an Array of FbGraph2::Post' do
8
+ posts = mock_graph :get, 'me/statuses', 'user/statuses', access_token: 'token' do
9
+ me.statuses
10
+ end
11
+ posts.should_not be_blank
12
+ posts.each do |post|
13
+ post.should be_instance_of FbGraph2::Post
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Television do
4
+ context 'included in User' do
5
+ describe '#television' do
6
+ let(:me) { FbGraph2::User.me('token') }
7
+ it 'should return an Array of FbGraph2::Page' do
8
+ pages = mock_graph :get, 'me/television', 'user/television', access_token: 'token' do
9
+ me.television
10
+ end
11
+ pages.should_not be_blank
12
+ pages.each do |page|
13
+ page.should be_instance_of FbGraph2::Page
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Edge::Videos do
4
+ context 'included in User' do
5
+ let(:me) { FbGraph2::User.me('token') }
6
+
7
+ describe '#videos' do
8
+ it 'should return an Array of FbGraph2::Video' do
9
+ videos = mock_graph :get, 'me/videos', 'user/videos', access_token: 'token' do
10
+ me.videos
11
+ end
12
+ videos.should_not be_blank
13
+ videos.each do |video|
14
+ video.should be_instance_of FbGraph2::Video
15
+ end
16
+ end
17
+ end
18
+
19
+ describe '#video!' do
20
+ it do
21
+ video = mock_graph :post, 'me/videos', 'success_with_id', access_token: 'token' do
22
+ me.video! source: File.new(__FILE__), message: 'hello'
23
+ end
24
+ video.should be_instance_of FbGraph2::Video
25
+ end
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::RequestFilter::Authenticator do
4
+ let(:klass) { FbGraph2::RequestFilter::Authenticator }
5
+
6
+ let(:endpoint) { 'https://graph.facebook.com/matake' }
7
+ let(:request) { HTTP::Message.new_request(:get, URI.parse(endpoint)) }
8
+ let(:request_filter) { klass.new token }
9
+
10
+ context 'when String given' do
11
+ let(:token) { 'token' }
12
+ it do
13
+ request_filter.filter_request(request)
14
+ request.header["Authorization"].should == ["Bearer #{token}"]
15
+ end
16
+ end
17
+
18
+ context 'when Rack::OAuth2::AccessToken::Bearer given' do
19
+ let(:token) { Rack::OAuth2::AccessToken::Bearer.new access_token: 'token' }
20
+ it do
21
+ request_filter.filter_request(request)
22
+ request.header["Authorization"].should == ["Bearer #{token.access_token}"]
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::RequestFilter::Debugger do
4
+ let(:endpoint) { 'https://graph.facebook.com/matake' }
5
+ let(:request) { HTTP::Message.new_request(:get, URI.parse(endpoint)) }
6
+ let(:response) { HTTP::Message.new_response({:hello => 'world'}.to_json) }
7
+ let(:request_filter) { FbGraph2::RequestFilter::Debugger.new }
8
+
9
+ describe '#filter_request' do
10
+ it 'should log request' do
11
+ [
12
+ "======= [FbGraph2] API REQUEST STARTED =======",
13
+ request.dump
14
+ ].each do |output|
15
+ expect(FbGraph2.logger).to receive(:info).with output
16
+ end
17
+ request_filter.filter_request(request)
18
+ end
19
+ end
20
+
21
+ describe '#filter_response' do
22
+ it 'should log response' do
23
+ [
24
+ "--------------------------------------------------",
25
+ response.dump,
26
+ "======= [FbGraph2] API REQUEST FINISHED ======="
27
+ ].each do |output|
28
+ expect(FbGraph2.logger).to receive(:info).with output
29
+ end
30
+ request_filter.filter_response(request, response)
31
+ end
32
+ end
33
+ end
@@ -14,7 +14,7 @@ describe FbGraph2::User do
14
14
  context 'when fetched' do
15
15
  it 'should call API' do
16
16
  me = mock_graph :get, 'me', 'user/me' do
17
- FbGraph2::User.me('token').fetch
17
+ klass.me('token').fetch
18
18
  end
19
19
  me.should be_instance_of klass
20
20
  end
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ describe FbGraph2::Util do
4
+ describe '.as_identifier' do
5
+ context 'when FbGraph2::Node given' do
6
+ it do
7
+ FbGraph2::Util.as_identifier(
8
+ FbGraph2::Node.new 'object_id'
9
+ ).should == 'object_id'
10
+ end
11
+ end
12
+
13
+ context 'when String given' do
14
+ it do
15
+ FbGraph2::Util.as_identifier('object_id').should == 'object_id'
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,15 @@
1
+ {
2
+ "category": "Business",
3
+ "daily_active_users": "10000",
4
+ "daily_active_users_rank": 1215,
5
+ "description": "A tool to help browse objects within the Facebook Graph API, manage permissions, obtain access tokens and learn how it all works.",
6
+ "icon_url": "https://fbcdn-photos-a-a.akamaihd.net/hphotos-ak-xpa1/t39.2081-0/851576_646264348772288_612357246_n.png",
7
+ "link": "https://www.facebook.com/apps/application.php?id=145634995501895",
8
+ "logo_url": "https://fbcdn-photos-a-a.akamaihd.net/hphotos-ak-xpa1/t39.2081-0/p75x75/851563_646263475439042_787584105_n.png",
9
+ "monthly_active_users": "500000",
10
+ "monthly_active_users_rank": 432,
11
+ "name": "Graph API Explorer",
12
+ "subcategory": "General",
13
+ "weekly_active_users": "100000",
14
+ "id": "145634995501895"
15
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "data": [{
3
+ "name": "Nov Matake",
4
+ "role": "MANAGER",
5
+ "perms": ["ADMINISTER", "EDIT_PROFILE", "CREATE_CONTENT", "MODERATE_CONTENT", "CREATE_ADS", "BASIC_ADMIN"],
6
+ "id": "10152411392127277"
7
+ }],
8
+ "paging": {
9
+ "next": "https://graph.facebook.com/v2.0/140478125968442/admins?limit=5000&offset=5000&__after_id=enc_AewHp5mZW0v4ZorlBTo4lsBccesXKfIJsKvOM-Qb268XDhHwKtZnhOhNwXWSun5KdHE"
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "user_id": true
3
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "data": [
3
+ {
4
+ "name": "Jr Nov",
5
+ "id": "1575327134"
6
+ }
7
+ ],
8
+ "paging": {
9
+ "next": "https://graph.facebook.com/v2.0/117513961602338/blocked?limit=5000&offset=5000&__after_id=enc_AewU3hSo5zqbS5KA0i0lJYmPrLn57SMSo645aYB7BTPg1PSawPvlM9mRI_3Y_dcpeDI"
10
+ }
11
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "data": [{
3
+ "id": "546071975451512",
4
+ "created_time": "2013-07-05T02:04:43+0000",
5
+ "description": "Big Guest from MIT-KIT",
6
+ "end_time": "2013-06-26T19:00:00+0000",
7
+ "from": {
8
+ "category": "Community",
9
+ "name": "Identity Conference #idcon",
10
+ "id": "367989543259757"
11
+ },
12
+ "start_time": "2013-06-26T19:00:00+0000",
13
+ "title": "idcon satellite",
14
+ "updated_time": "2013-07-05T02:04:43+0000"
15
+ }],
16
+ "paging": {
17
+ "next": "https://graph.facebook.com/v2.0/367989543259757/milestones?limit=5000&offset=5000&__after_id=enc_Aex6DrtZcpP_AZjou_LFSynIQJzuO-LR4zoj2GU-WQO3StnFciL5I6GVJ2Nlj5-6C50JJSpZnn5O-zkuPXcU4DAC"
18
+ }
19
+ }
@@ -0,0 +1,67 @@
1
+ {
2
+ "data": [{
3
+ "id": "140478125968442_881790788503835",
4
+ "from": {
5
+ "category": "Community organization",
6
+ "name": "OAuth.jp",
7
+ "id": "140478125968442"
8
+ },
9
+ "story": "OAuth.jp shared a link.",
10
+ "story_tags": {
11
+ "0": [{
12
+ "id": "140478125968442",
13
+ "name": "OAuth.jp",
14
+ "offset": 0,
15
+ "length": 8,
16
+ "type": "page"
17
+ }]
18
+ },
19
+ "link": "http://oauth.jp/blog/2014/05/09/what-happens-when-oauth2-code-leaked/",
20
+ "name": "OAuth 2.0 の code は漏れても大丈夫ってホント!? - OAuth.jp",
21
+ "caption": "oauth.jp",
22
+ "description": "昨日のCovert Redirect で Query 漏れるケースもある!?やOAuth 2.0 の脆弱性 (!?) “Covert Redirect” とはにあるように、OAuth 2.0 の code が漏れちゃうことも、ありえます。 漏れないためにやるべきことは、 …",
23
+ "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/aS8ecmYRys0.gif",
24
+ "actions": [{
25
+ "name": "Comment",
26
+ "link": "https://www.facebook.com/140478125968442/posts/881790788503835"
27
+ }, {
28
+ "name": "Like",
29
+ "link": "https://www.facebook.com/140478125968442/posts/881790788503835"
30
+ }],
31
+ "privacy": {
32
+ "description": "Public",
33
+ "value": "EVERYONE",
34
+ "friends": "",
35
+ "networks": "",
36
+ "allow": "",
37
+ "deny": ""
38
+ },
39
+ "type": "link",
40
+ "status_type": "shared_story",
41
+ "created_time": "2014-05-09T02:18:54+0000",
42
+ "updated_time": "2014-05-09T02:18:54+0000",
43
+ "is_published": true,
44
+ "likes": {
45
+ "data": [{
46
+ "id": "799980330042786",
47
+ "name": "Nobuyuki Tetsuka"
48
+ }, {
49
+ "id": "671955032839764",
50
+ "name": "Naohiro Fujie"
51
+ }, {
52
+ "id": "514441882016076",
53
+ "name": "Shouji Ohara"
54
+ }],
55
+ "paging": {
56
+ "cursors": {
57
+ "after": "NTE0NDQxODgyMDE2MDc2",
58
+ "before": "Nzk5OTgwMzMwMDQyNzg2"
59
+ }
60
+ }
61
+ }
62
+ }],
63
+ "paging": {
64
+ "previous": "https://graph.facebook.com/v2.0/140478125968442/promotable_posts?limit=25&since=1399601934",
65
+ "next": "https://graph.facebook.com/v2.0/140478125968442/promotable_posts?limit=25&until=1340970652"
66
+ }
67
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "data": [{
3
+ "id": "689134294485152_695439827187932",
4
+ "from": {
5
+ "id": "689134294485152",
6
+ "name": "Shunya Iriki"
7
+ },
8
+ "story": "Shunya Iriki shared a link.",
9
+ "story_tags": {
10
+ "0": [{
11
+ "id": "689134294485152",
12
+ "name": "Shunya Iriki",
13
+ "offset": 0,
14
+ "length": 12,
15
+ "type": "user"
16
+ }]
17
+ },
18
+ "picture": "https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCtEdPdezKIoUxo&w=154&h=154&url=http%3A%2F%2Fi.yimg.jp%2Fi%2Fdocs%2Frelease%2Ffbicon.jpg",
19
+ "link": "http://docs.yahoo.co.jp/docs/info/terms/chapter1.html#cf2nd",
20
+ "name": "ヤフー株式会社 - サービス利用規約 第1編 基本ガイドライン",
21
+ "caption": "docs.yahoo.co.jp",
22
+ "description": "Yahoo! JAPANのサービス利用規約、第1編 基本ガイドラインは当社のサービスをご利用になるすべての方に共通して適用されます。",
23
+ "icon": "https://fbstatic-a.akamaihd.net/rsrc.php/v2/yD/r/aS8ecmYRys0.gif",
24
+ "actions": [{
25
+ "name": "Comment",
26
+ "link": "https://www.facebook.com/100001657627507/posts/695439827187932"
27
+ }, {
28
+ "name": "Like",
29
+ "link": "https://www.facebook.com/100001657627507/posts/695439827187932"
30
+ }],
31
+ "privacy": {
32
+ "value": ""
33
+ },
34
+ "type": "link",
35
+ "status_type": "shared_story",
36
+ "application": {
37
+ "name": "Facebook for iPhone",
38
+ "namespace": "fbiphone",
39
+ "id": "6628568379"
40
+ },
41
+ "created_time": "2014-06-02T12:46:26+0000",
42
+ "updated_time": "2014-06-02T12:46:26+0000"
43
+ }],
44
+ "paging": {
45
+ "cursors": {
46
+ "after": "Njk1NDM5ODI3MTg3OTMy",
47
+ "before": "Njk1NDM5ODI3MTg3OTMy"
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "success": true
3
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "data": [{
3
+ "id": "10150407675002277",
4
+ "from": {
5
+ "id": "579612276",
6
+ "name": "Nov Matake"
7
+ },
8
+ "start_time": "2011-11-09T08:04:58+0000",
9
+ "end_time": "2011-11-09T08:04:58+0000",
10
+ "publish_time": "2011-11-09T08:04:58+0000",
11
+ "application": {
12
+ "name": "gem sample",
13
+ "namespace": "fbgraphsample",
14
+ "id": "134145643294322"
15
+ },
16
+ "data": {
17
+ "achievement": {
18
+ "id": "10150310611431721",
19
+ "url": "http://fbgraphsample.heroku.com/achievements/1",
20
+ "type": "game.achievement",
21
+ "title": "1st Achievement"
22
+ }
23
+ },
24
+ "type": "games.achieves",
25
+ "no_feed_story": false,
26
+ "likes": {
27
+ "count": 0,
28
+ "can_like": true,
29
+ "user_likes": false
30
+ },
31
+ "comments": {
32
+ "count": 0,
33
+ "can_comment": true,
34
+ "comment_order": "chronological"
35
+ }
36
+ }],
37
+ "paging": {
38
+ "next": "https://graph.facebook.com/v2.0/579612276/achievements?limit=25&offset=25&__after_id=enc_AeyhCSdwSdwIMz2Kbpibnp2MZgYC1gasXThstsCJgxJdxwL9V_ss1OPBDnrxUgpTqAe1QOHjq-un-45-IJXJFrLv"
39
+ }
40
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "data": [{
3
+ "category": "Interest",
4
+ "name": "Mobile Hack Tokyo",
5
+ "created_time": "2012-03-01T00:30:09+0000",
6
+ "id": "253431701402959"
7
+ }, {
8
+ "category": "Software",
9
+ "name": "Rack::OAuth2",
10
+ "created_time": "2011-06-23T10:32:47+0000",
11
+ "id": "141477809244105"
12
+ }, {
13
+ "category": "Non-profit organization",
14
+ "name": "OpenID Foundation Japan",
15
+ "created_time": "2011-06-23T04:53:40+0000",
16
+ "id": "157574337644417"
17
+ }, {
18
+ "category": "Internet/software",
19
+ "name": "SocialWeb Japan",
20
+ "created_time": "2011-04-26T04:54:13+0000",
21
+ "id": "150730961633"
22
+ }, {
23
+ "category": "Community organization",
24
+ "name": "OAuth.jp",
25
+ "created_time": "2011-01-05T00:27:02+0000",
26
+ "id": "140478125968442"
27
+ }, {
28
+ "category": "Software",
29
+ "name": "FbGraph",
30
+ "created_time": "2010-04-30T06:48:21+0000",
31
+ "id": "117513961602338"
32
+ }],
33
+ "paging": {
34
+ "next": "https://graph.facebook.com/v2.0/579612276/activities?limit=25&offset=25&__after_id=enc_AewISXs8Uhe2pwegtVsWC8GFmzAWEKKFzGcJoZ-UJa4MA_wFfCIRKFaQMJkS6U5WTdiSKw3G3EvlyDir1upNCBop"
35
+ }
36
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "data": [{
3
+ "id": "532912916729105",
4
+ "from": {
5
+ "category": "Software",
6
+ "name": "FbGraph",
7
+ "id": "117513961602338"
8
+ },
9
+ "name": "Timeline Photos",
10
+ "link": "https://www.facebook.com/album.php?fbid=532912916729105&id=117513961602338&aid=116544",
11
+ "privacy": "everyone",
12
+ "type": "wall",
13
+ "created_time": "2013-02-16T13:23:10+0000",
14
+ "updated_time": "2013-02-16T13:23:10+0000",
15
+ "can_upload": false
16
+ }],
17
+ "paging": {
18
+ "cursors": {
19
+ "after": "MjEwNDcxNDkyMzA2NTg0",
20
+ "before": "NTMyOTEyOTE2NzI5MTA1"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "data": [{
3
+ "category": "Book",
4
+ "name": "Predictably Irrational",
5
+ "created_time": "2011-07-27T15:49:06+0000",
6
+ "id": "113167718696752"
7
+ }],
8
+ "paging": {
9
+ "next": "https://graph.facebook.com/v2.0/579612276/books?limit=25&offset=25&__after_id=enc_AewjHX22qV_-BoIxoRMWHPno7BxZHunbqYgaxlHlJnH0x_Gza1bYpFD6V7Vve1HL-21x7kD5E_3QMLzdjM9pmK_f"
10
+ }
11
+ }