fb_graph 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +21 -0
- data/VERSION +1 -1
- data/fb_graph.gemspec +335 -332
- data/lib/fb_graph/page.rb +4 -2
- data/lib/fb_graph/user.rb +8 -3
- data/spec/fake_json/pages/platform_public.json +1 -1
- data/spec/fake_json/posts/platform_private.json +0 -1
- data/spec/fake_json/posts/platform_public.json +9 -1
- data/spec/fake_json/users/feed/arjun_private.json +6 -15
- data/spec/fake_json/users/feed/arjun_public.json +6 -15
- data/spec/fake_json/users/home/me_private_next.json +1 -2
- data/spec/fake_json/users/posts/arjun_private.json +4 -13
- data/spec/fake_json/users/posts/arjun_public.json +4 -13
- data/spec/fake_json/users/tagged/arjun_private.json +3 -7
- data/spec/fake_json/users/tagged/arjun_public.json +3 -7
- data/spec/fb_graph/connections/feed_spec.rb +0 -2
- data/spec/fb_graph/connections/posts_spec.rb +0 -1
- data/spec/fb_graph/connections/tagged_spec.rb +0 -1
- data/spec/fb_graph/page_spec.rb +6 -5
- data/spec/fb_graph/post_spec.rb +4 -2
- data/spec/fb_graph/user_spec.rb +4 -2
- metadata +9 -8
data/lib/fb_graph/page.rb
CHANGED
@@ -16,7 +16,7 @@ module FbGraph
|
|
16
16
|
include Connections::Videos
|
17
17
|
extend Searchable
|
18
18
|
|
19
|
-
attr_accessor :name, :username, :link, :category, :founded, :is_community_page, :company_overview, :general_info, :mission, :products, :release_date, :location, :website, :like_count, :checkin_count, :with, :created_time
|
19
|
+
attr_accessor :name, :username, :link, :category, :founded, :can_post, :is_community_page, :company_overview, :general_info, :mission, :products, :release_date, :location, :website, :websites, :like_count, :checkin_count, :with, :created_time
|
20
20
|
|
21
21
|
def initialize(identifier, attributes = {})
|
22
22
|
super
|
@@ -27,12 +27,13 @@ module FbGraph
|
|
27
27
|
if (founded = attributes[:founded])
|
28
28
|
@founded = Date.parse(founded) rescue Date.new(founded.to_i)
|
29
29
|
end
|
30
|
+
@can_post = attributes[:can_post]
|
30
31
|
@is_community_page = attributes[:is_community_page]
|
31
32
|
@company_overview = attributes[:company_overview]
|
32
33
|
@general_info = attributes[:general_info]
|
33
34
|
@mission = attributes[:mission]
|
34
35
|
if (products = attributes[:products])
|
35
|
-
@products = products.split
|
36
|
+
@products = products.split("\n")
|
36
37
|
end
|
37
38
|
if (release_date = attributes[:release_date])
|
38
39
|
@release_date = Date.parse(release_date) rescue release_date
|
@@ -41,6 +42,7 @@ module FbGraph
|
|
41
42
|
@location = Venue.new(location)
|
42
43
|
end
|
43
44
|
@website = attributes[:website]
|
45
|
+
@websites = attributes[:website].to_s.split
|
44
46
|
@like_count = attributes[:likes]
|
45
47
|
@checkin_count = attributes[:checkins]
|
46
48
|
@with = []
|
data/lib/fb_graph/user.rb
CHANGED
@@ -33,7 +33,7 @@ module FbGraph
|
|
33
33
|
# ++
|
34
34
|
extend Searchable
|
35
35
|
|
36
|
-
attr_accessor :first_name, :last_name, :name, :link, :about, :birthday, :work, :education, :email, :website, :hometown, :location, :bio, :quotes, :gender, :interested_in, :meeting_for, :relationship_status, :religion, :political, :verified, :significant_other, :timezone, :updated_time, :sports, :favorite_teams, :favorite_athletes, :inspirational_people, :locale, :languages, :third_party_id
|
36
|
+
attr_accessor :first_name, :last_name, :name, :link, :about, :birthday, :work, :education, :email, :website, :websites, :hometown, :location, :bio, :quotes, :gender, :interested_in, :meeting_for, :relationship_status, :religion, :political, :verified, :significant_other, :timezone, :updated_time, :sports, :favorite_teams, :favorite_athletes, :inspirational_people, :locale, :languages, :third_party_id, :address, :mobile_phone
|
37
37
|
|
38
38
|
def initialize(identifier, attributes = {})
|
39
39
|
super
|
@@ -59,8 +59,9 @@ module FbGraph
|
|
59
59
|
@education << Education.new(education)
|
60
60
|
end
|
61
61
|
end
|
62
|
-
@email
|
63
|
-
@website = attributes[:website]
|
62
|
+
@email = attributes[:email]
|
63
|
+
@website = attributes[:website]
|
64
|
+
@websites = attributes[:website].to_s.split
|
64
65
|
if (hometown = attributes[:hometown])
|
65
66
|
@hometown = Page.new(hometown.delete(:id), hometown)
|
66
67
|
end
|
@@ -115,6 +116,10 @@ module FbGraph
|
|
115
116
|
if attributes[:updated_time]
|
116
117
|
@updated_time = Time.parse(attributes[:updated_time]).utc
|
117
118
|
end
|
119
|
+
if attributes[:address]
|
120
|
+
@address = Venue.new(attributes[:address])
|
121
|
+
end
|
122
|
+
@mobile_phone = attributes[:mobile_phone]
|
118
123
|
end
|
119
124
|
|
120
125
|
def self.me(access_token)
|
@@ -9,5 +9,5 @@
|
|
9
9
|
"company_overview": "Facebook Platform enables anyone to build social applications on Facebook and the web.",
|
10
10
|
"mission": "To make the web more open and social.",
|
11
11
|
"products": "Facebook Application Programming Interface (API)\nFacebook Query Language (FQL)\nFacebook Markup Language (FBML)\nFacebook JavaScript (FBJS)\nFacebook Connect\n",
|
12
|
-
"
|
12
|
+
"likes": 578214
|
13
13
|
}
|
@@ -8,7 +8,6 @@
|
|
8
8
|
"message": "We're getting ready for f8! Check out the latest on the f8 Page, including a video from the first event, when Platform launched :: http://bit.ly/ahHl7j",
|
9
9
|
"created_time": "2010-04-15T17:37:03+0000",
|
10
10
|
"updated_time": "2010-04-22T18:19:13+0000",
|
11
|
-
"likes": 61,
|
12
11
|
"comments": {
|
13
12
|
"data": [
|
14
13
|
{
|
@@ -8,7 +8,15 @@
|
|
8
8
|
"message": "We're getting ready for f8! Check out the latest on the f8 Page, including a video from the first event, when Platform launched :: http://bit.ly/ahHl7j",
|
9
9
|
"created_time": "2010-04-15T17:37:03+0000",
|
10
10
|
"updated_time": "2010-04-22T18:19:13+0000",
|
11
|
-
"likes":
|
11
|
+
"likes": {
|
12
|
+
"data": [
|
13
|
+
{
|
14
|
+
"name": "Anter Saied",
|
15
|
+
"id": "100000785546814"
|
16
|
+
}
|
17
|
+
],
|
18
|
+
"count": 270
|
19
|
+
},
|
12
20
|
"comments": {
|
13
21
|
"data": [
|
14
22
|
{
|
@@ -16,8 +16,7 @@
|
|
16
16
|
"value": "EVERYONE"
|
17
17
|
},
|
18
18
|
"created_time": "2010-04-25T04:05:32+0000",
|
19
|
-
"updated_time": "2010-04-25T04:05:32+0000"
|
20
|
-
"likes": 1
|
19
|
+
"updated_time": "2010-04-25T04:05:32+0000"
|
21
20
|
},
|
22
21
|
{
|
23
22
|
"id": "7901103_118197241540650",
|
@@ -33,7 +32,6 @@
|
|
33
32
|
},
|
34
33
|
"created_time": "2010-04-25T01:37:38+0000",
|
35
34
|
"updated_time": "2010-04-25T16:48:51+0000",
|
36
|
-
"likes": 2,
|
37
35
|
"comments": {
|
38
36
|
"data": [
|
39
37
|
{
|
@@ -118,8 +116,7 @@
|
|
118
116
|
"value": "EVERYONE"
|
119
117
|
},
|
120
118
|
"created_time": "2010-04-24T08:07:59+0000",
|
121
|
-
"updated_time": "2010-04-24T08:07:59+0000"
|
122
|
-
"likes": 1
|
119
|
+
"updated_time": "2010-04-24T08:07:59+0000"
|
123
120
|
},
|
124
121
|
{
|
125
122
|
"id": "7901103_116029421758901",
|
@@ -140,7 +137,6 @@
|
|
140
137
|
},
|
141
138
|
"created_time": "2010-04-24T00:58:19+0000",
|
142
139
|
"updated_time": "2010-04-24T01:02:17+0000",
|
143
|
-
"likes": 2,
|
144
140
|
"comments": {
|
145
141
|
"data": [
|
146
142
|
{
|
@@ -171,8 +167,7 @@
|
|
171
167
|
"value": "EVERYONE"
|
172
168
|
},
|
173
169
|
"created_time": "2010-04-23T20:31:42+0000",
|
174
|
-
"updated_time": "2010-04-23T20:31:42+0000"
|
175
|
-
"likes": 1
|
170
|
+
"updated_time": "2010-04-23T20:31:42+0000"
|
176
171
|
},
|
177
172
|
{
|
178
173
|
"id": "7901103_117549861604312",
|
@@ -190,8 +185,7 @@
|
|
190
185
|
"value": "EVERYONE"
|
191
186
|
},
|
192
187
|
"created_time": "2010-04-23T19:40:22+0000",
|
193
|
-
"updated_time": "2010-04-23T19:40:22+0000"
|
194
|
-
"likes": 1
|
188
|
+
"updated_time": "2010-04-23T19:40:22+0000"
|
195
189
|
},
|
196
190
|
{
|
197
191
|
"id": "7901103_10100207879175340",
|
@@ -435,8 +429,7 @@
|
|
435
429
|
"value": "EVERYONE"
|
436
430
|
},
|
437
431
|
"created_time": "2010-04-21T18:00:23+0000",
|
438
|
-
"updated_time": "2010-04-21T18:00:23+0000"
|
439
|
-
"likes": 3
|
432
|
+
"updated_time": "2010-04-21T18:00:23+0000"
|
440
433
|
},
|
441
434
|
{
|
442
435
|
"id": "7901103_113242142040451",
|
@@ -462,7 +455,6 @@
|
|
462
455
|
},
|
463
456
|
"created_time": "2010-04-21T17:55:50+0000",
|
464
457
|
"updated_time": "2010-04-21T20:22:56+0000",
|
465
|
-
"likes": 1,
|
466
458
|
"comments": {
|
467
459
|
"data": [
|
468
460
|
{
|
@@ -509,8 +501,7 @@
|
|
509
501
|
"value": "EVERYONE"
|
510
502
|
},
|
511
503
|
"created_time": "2010-04-21T07:55:49+0000",
|
512
|
-
"updated_time": "2010-04-21T07:55:49+0000"
|
513
|
-
"likes": 1
|
504
|
+
"updated_time": "2010-04-21T07:55:49+0000"
|
514
505
|
}
|
515
506
|
],
|
516
507
|
"paging": {
|
@@ -16,8 +16,7 @@
|
|
16
16
|
"value": "EVERYONE"
|
17
17
|
},
|
18
18
|
"created_time": "2010-04-25T04:05:32+0000",
|
19
|
-
"updated_time": "2010-04-25T04:05:32+0000"
|
20
|
-
"likes": 1
|
19
|
+
"updated_time": "2010-04-25T04:05:32+0000"
|
21
20
|
},
|
22
21
|
{
|
23
22
|
"id": "7901103_118197241540650",
|
@@ -33,7 +32,6 @@
|
|
33
32
|
},
|
34
33
|
"created_time": "2010-04-25T01:37:38+0000",
|
35
34
|
"updated_time": "2010-04-25T16:48:51+0000",
|
36
|
-
"likes": 2,
|
37
35
|
"comments": {
|
38
36
|
"data": [
|
39
37
|
{
|
@@ -118,8 +116,7 @@
|
|
118
116
|
"value": "EVERYONE"
|
119
117
|
},
|
120
118
|
"created_time": "2010-04-24T08:07:59+0000",
|
121
|
-
"updated_time": "2010-04-24T08:07:59+0000"
|
122
|
-
"likes": 1
|
119
|
+
"updated_time": "2010-04-24T08:07:59+0000"
|
123
120
|
},
|
124
121
|
{
|
125
122
|
"id": "7901103_116029421758901",
|
@@ -140,7 +137,6 @@
|
|
140
137
|
},
|
141
138
|
"created_time": "2010-04-24T00:58:19+0000",
|
142
139
|
"updated_time": "2010-04-24T01:02:17+0000",
|
143
|
-
"likes": 2,
|
144
140
|
"comments": {
|
145
141
|
"data": [
|
146
142
|
{
|
@@ -171,8 +167,7 @@
|
|
171
167
|
"value": "EVERYONE"
|
172
168
|
},
|
173
169
|
"created_time": "2010-04-23T20:31:42+0000",
|
174
|
-
"updated_time": "2010-04-23T20:31:42+0000"
|
175
|
-
"likes": 1
|
170
|
+
"updated_time": "2010-04-23T20:31:42+0000"
|
176
171
|
},
|
177
172
|
{
|
178
173
|
"id": "7901103_117549861604312",
|
@@ -190,8 +185,7 @@
|
|
190
185
|
"value": "EVERYONE"
|
191
186
|
},
|
192
187
|
"created_time": "2010-04-23T19:40:22+0000",
|
193
|
-
"updated_time": "2010-04-23T19:40:22+0000"
|
194
|
-
"likes": 1
|
188
|
+
"updated_time": "2010-04-23T19:40:22+0000"
|
195
189
|
},
|
196
190
|
{
|
197
191
|
"id": "7901103_10100207879175340",
|
@@ -435,8 +429,7 @@
|
|
435
429
|
"value": "EVERYONE"
|
436
430
|
},
|
437
431
|
"created_time": "2010-04-21T18:00:23+0000",
|
438
|
-
"updated_time": "2010-04-21T18:00:23+0000"
|
439
|
-
"likes": 3
|
432
|
+
"updated_time": "2010-04-21T18:00:23+0000"
|
440
433
|
},
|
441
434
|
{
|
442
435
|
"id": "7901103_113242142040451",
|
@@ -462,7 +455,6 @@
|
|
462
455
|
},
|
463
456
|
"created_time": "2010-04-21T17:55:50+0000",
|
464
457
|
"updated_time": "2010-04-21T20:22:56+0000",
|
465
|
-
"likes": 1,
|
466
458
|
"comments": {
|
467
459
|
"data": [
|
468
460
|
{
|
@@ -509,8 +501,7 @@
|
|
509
501
|
"value": "EVERYONE"
|
510
502
|
},
|
511
503
|
"created_time": "2010-04-21T07:55:49+0000",
|
512
|
-
"updated_time": "2010-04-21T07:55:49+0000"
|
513
|
-
"likes": 1
|
504
|
+
"updated_time": "2010-04-21T07:55:49+0000"
|
514
505
|
}
|
515
506
|
],
|
516
507
|
"paging": {
|
@@ -16,8 +16,7 @@
|
|
16
16
|
"value": "EVERYONE"
|
17
17
|
},
|
18
18
|
"created_time": "2010-04-25T04:05:32+0000",
|
19
|
-
"updated_time": "2010-04-25T04:05:32+0000"
|
20
|
-
"likes": 1
|
19
|
+
"updated_time": "2010-04-25T04:05:32+0000"
|
21
20
|
},
|
22
21
|
{
|
23
22
|
"id": "7901103_118197241540650",
|
@@ -33,7 +32,6 @@
|
|
33
32
|
},
|
34
33
|
"created_time": "2010-04-25T01:37:38+0000",
|
35
34
|
"updated_time": "2010-04-25T16:48:51+0000",
|
36
|
-
"likes": 2,
|
37
35
|
"comments": {
|
38
36
|
"data": [
|
39
37
|
{
|
@@ -112,7 +110,6 @@
|
|
112
110
|
},
|
113
111
|
"created_time": "2010-04-24T00:58:19+0000",
|
114
112
|
"updated_time": "2010-04-24T01:02:17+0000",
|
115
|
-
"likes": 2,
|
116
113
|
"comments": {
|
117
114
|
"data": [
|
118
115
|
{
|
@@ -143,8 +140,7 @@
|
|
143
140
|
"value": "EVERYONE"
|
144
141
|
},
|
145
142
|
"created_time": "2010-04-23T20:31:42+0000",
|
146
|
-
"updated_time": "2010-04-23T20:31:42+0000"
|
147
|
-
"likes": 1
|
143
|
+
"updated_time": "2010-04-23T20:31:42+0000"
|
148
144
|
},
|
149
145
|
{
|
150
146
|
"id": "7901103_117549861604312",
|
@@ -162,8 +158,7 @@
|
|
162
158
|
"value": "EVERYONE"
|
163
159
|
},
|
164
160
|
"created_time": "2010-04-23T19:40:22+0000",
|
165
|
-
"updated_time": "2010-04-23T19:40:22+0000"
|
166
|
-
"likes": 1
|
161
|
+
"updated_time": "2010-04-23T19:40:22+0000"
|
167
162
|
},
|
168
163
|
{
|
169
164
|
"id": "7901103_113559395341627",
|
@@ -235,7 +230,6 @@
|
|
235
230
|
},
|
236
231
|
"created_time": "2010-04-21T00:48:41+0000",
|
237
232
|
"updated_time": "2010-04-21T11:10:48+0000",
|
238
|
-
"likes": 1,
|
239
233
|
"comments": {
|
240
234
|
"data": [
|
241
235
|
{
|
@@ -278,7 +272,6 @@
|
|
278
272
|
},
|
279
273
|
"created_time": "2010-04-20T23:49:20+0000",
|
280
274
|
"updated_time": "2010-04-21T11:36:30+0000",
|
281
|
-
"likes": 3,
|
282
275
|
"comments": {
|
283
276
|
"data": [
|
284
277
|
{
|
@@ -335,7 +328,6 @@
|
|
335
328
|
},
|
336
329
|
"created_time": "2010-04-16T23:19:22+0000",
|
337
330
|
"updated_time": "2010-04-17T17:54:49+0000",
|
338
|
-
"likes": 2,
|
339
331
|
"comments": {
|
340
332
|
"data": [
|
341
333
|
{
|
@@ -375,8 +367,7 @@
|
|
375
367
|
"value": "EVERYONE"
|
376
368
|
},
|
377
369
|
"created_time": "2010-04-14T00:53:54+0000",
|
378
|
-
"updated_time": "2010-04-14T00:53:54+0000"
|
379
|
-
"likes": 4
|
370
|
+
"updated_time": "2010-04-14T00:53:54+0000"
|
380
371
|
}
|
381
372
|
],
|
382
373
|
"paging": {
|
@@ -16,8 +16,7 @@
|
|
16
16
|
"value": "EVERYONE"
|
17
17
|
},
|
18
18
|
"created_time": "2010-04-25T04:05:32+0000",
|
19
|
-
"updated_time": "2010-04-25T04:05:32+0000"
|
20
|
-
"likes": 1
|
19
|
+
"updated_time": "2010-04-25T04:05:32+0000"
|
21
20
|
},
|
22
21
|
{
|
23
22
|
"id": "7901103_118197241540650",
|
@@ -33,7 +32,6 @@
|
|
33
32
|
},
|
34
33
|
"created_time": "2010-04-25T01:37:38+0000",
|
35
34
|
"updated_time": "2010-04-25T16:48:51+0000",
|
36
|
-
"likes": 2,
|
37
35
|
"comments": {
|
38
36
|
"data": [
|
39
37
|
{
|
@@ -112,7 +110,6 @@
|
|
112
110
|
},
|
113
111
|
"created_time": "2010-04-24T00:58:19+0000",
|
114
112
|
"updated_time": "2010-04-24T01:02:17+0000",
|
115
|
-
"likes": 2,
|
116
113
|
"comments": {
|
117
114
|
"data": [
|
118
115
|
{
|
@@ -143,8 +140,7 @@
|
|
143
140
|
"value": "EVERYONE"
|
144
141
|
},
|
145
142
|
"created_time": "2010-04-23T20:31:42+0000",
|
146
|
-
"updated_time": "2010-04-23T20:31:42+0000"
|
147
|
-
"likes": 1
|
143
|
+
"updated_time": "2010-04-23T20:31:42+0000"
|
148
144
|
},
|
149
145
|
{
|
150
146
|
"id": "7901103_117549861604312",
|
@@ -162,8 +158,7 @@
|
|
162
158
|
"value": "EVERYONE"
|
163
159
|
},
|
164
160
|
"created_time": "2010-04-23T19:40:22+0000",
|
165
|
-
"updated_time": "2010-04-23T19:40:22+0000"
|
166
|
-
"likes": 1
|
161
|
+
"updated_time": "2010-04-23T19:40:22+0000"
|
167
162
|
},
|
168
163
|
{
|
169
164
|
"id": "7901103_113559395341627",
|
@@ -235,7 +230,6 @@
|
|
235
230
|
},
|
236
231
|
"created_time": "2010-04-21T00:48:41+0000",
|
237
232
|
"updated_time": "2010-04-21T11:10:48+0000",
|
238
|
-
"likes": 1,
|
239
233
|
"comments": {
|
240
234
|
"data": [
|
241
235
|
{
|
@@ -278,7 +272,6 @@
|
|
278
272
|
},
|
279
273
|
"created_time": "2010-04-20T23:49:20+0000",
|
280
274
|
"updated_time": "2010-04-21T11:36:30+0000",
|
281
|
-
"likes": 3,
|
282
275
|
"comments": {
|
283
276
|
"data": [
|
284
277
|
{
|
@@ -335,7 +328,6 @@
|
|
335
328
|
},
|
336
329
|
"created_time": "2010-04-16T23:19:22+0000",
|
337
330
|
"updated_time": "2010-04-17T17:54:49+0000",
|
338
|
-
"likes": 2,
|
339
331
|
"comments": {
|
340
332
|
"data": [
|
341
333
|
{
|
@@ -375,8 +367,7 @@
|
|
375
367
|
"value": "EVERYONE"
|
376
368
|
},
|
377
369
|
"created_time": "2010-04-14T00:53:54+0000",
|
378
|
-
"updated_time": "2010-04-14T00:53:54+0000"
|
379
|
-
"likes": 4
|
370
|
+
"updated_time": "2010-04-14T00:53:54+0000"
|
380
371
|
}
|
381
372
|
],
|
382
373
|
"paging": {
|
@@ -25,8 +25,7 @@
|
|
25
25
|
"value": "EVERYONE"
|
26
26
|
},
|
27
27
|
"created_time": "2010-04-24T08:07:59+0000",
|
28
|
-
"updated_time": "2010-04-24T08:07:59+0000"
|
29
|
-
"likes": 1
|
28
|
+
"updated_time": "2010-04-24T08:07:59+0000"
|
30
29
|
},
|
31
30
|
{
|
32
31
|
"id": "7901103_10100207879175340",
|
@@ -223,8 +222,7 @@
|
|
223
222
|
"value": "EVERYONE"
|
224
223
|
},
|
225
224
|
"created_time": "2010-04-21T18:00:23+0000",
|
226
|
-
"updated_time": "2010-04-21T18:00:23+0000"
|
227
|
-
"likes": 3
|
225
|
+
"updated_time": "2010-04-21T18:00:23+0000"
|
228
226
|
},
|
229
227
|
{
|
230
228
|
"id": "7901103_113242142040451",
|
@@ -250,7 +248,6 @@
|
|
250
248
|
},
|
251
249
|
"created_time": "2010-04-21T17:55:50+0000",
|
252
250
|
"updated_time": "2010-04-21T20:22:56+0000",
|
253
|
-
"likes": 1,
|
254
251
|
"comments": {
|
255
252
|
"data": [
|
256
253
|
{
|
@@ -297,8 +294,7 @@
|
|
297
294
|
"value": "EVERYONE"
|
298
295
|
},
|
299
296
|
"created_time": "2010-04-21T07:55:49+0000",
|
300
|
-
"updated_time": "2010-04-21T07:55:49+0000"
|
301
|
-
"likes": 1
|
297
|
+
"updated_time": "2010-04-21T07:55:49+0000"
|
302
298
|
}
|
303
299
|
],
|
304
300
|
"paging": {
|