/
mock_facebook_responses.yml
523 lines (461 loc) · 22 KB
/
mock_facebook_responses.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# Responses by MockHTTPService are taken directly from
# this file.
#
# Structure
# ----------
#
# path:
# arguments: # sorted by key
# method: # HTTP method (GET, POST, DELETE, etc.)
# with_token:
# no_token:
# ====== REST API =====
rest_api:
# -- Stubbed Responses --
/method/admin.setAppProperties:
'properties={"desktop":0}':
post:
with_token: 'true'
/method/fql.query: # for testing the beta tier
query=select first_name from user where uid = 2901279:
get:
no_token: '[{"first_name":"Luke"}]'
with_token: '[{"first_name":"Luke"}]'
# ====== GRAPH API =====
graph_api:
# -- Common Responses --
# Error responses for when a token is required, but not given
token_required_responses: &token_required
no_token:
code: 400
body: '{"error":{"type":"OAuthAccessTokenException", "message":"An access token is required to request this resource."}}'
# Common mock item responses
item_deleted: &item_deleted
delete:
with_token: 'true'
# OAuth error response
oauth_error: &oauth_error
no_token:
code: 400
body: '{"error": {"code"=>2500, "type": "OAuthException", "message": "Error validating verification code."}}'
# Subscription error response
verification_error: &verification_error
with_token:
code: 400
body: '{"error": {"code"=>2500, "type": "OAuthException", "message": "Error validating verification code."}}'
test_user_uninstalled: &test_user_uninstalled
post:
with_token: '{"id": "777777777", "access_token":"<%= APP_ACCESS_TOKEN %>", "login_url":"https://www.facebook.com/platform/test_account.."}'
test_user_installed: &test_user_installed
post:
with_token: '{"id": "999999999", "access_token":"<%= ACCESS_TOKEN %>", "login_url":"https://www.facebook.com/platform/test_account.."}'
test_user_befriended: &test_user_befriended
post:
with_token: 'true'
# -- Stubbed Responses --
root:
ids=facebook,koppel:
get:
with_token: '{"facebook":"{}","koppel":"{}"}'
no_token: '{"facebook":"{}","koppel":"{}"}'
# Ruby 1.8.7 and 1.9.2 generate JSON with different key ordering, hence we have to dynamically generate it here
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me"},{"method" => "get", "relative_url" => "koppel"}]) %>:
post:
with_token: '[{"code": 200, "body":"{\"id\":\"123\"}"}, {"code": 200, "body":"{\"id\":\"456\"}"}]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me/picture"}]) %>:
post:
with_token: '[{"code": 302, "headers":[{"name":"Location","value":"http://google.com"}]}]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me/picture?redirect=false"}]) %>:
post:
with_token: '[{"code": 200, "body":"{\"data\":{\"is_silhouette\":false,\"url\":\"http:\/\/google.com\"}}"}]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me"},{"method" => "get", "relative_url" => "me/friends"}]) %>:
post:
with_token: '[{"code": 200, "body":"{\"id\":\"koppel\"}"}, {"code": 200, "body":"{\"data\":[{\"id\":\"lukeshepard\"}],\"paging\":{}}"}]'
batch=<%= JSON.dump([{"method"=>"get", "relative_url"=>"me"}, {"method"=>"get", "relative_url"=>"#{OAUTH_DATA["app_id"]}/insights?access_token=#{CGI.escape APP_ACCESS_TOKEN}"}]) %>:
post:
with_token: '[{"code": 200, "body":"{\"id\":\"123\"}"}, {"code": 200, "body":"{\"data\":[],\"paging\":{}}"}]'
batch=<%= JSON.dump([{"method"=>"get", "relative_url"=>"2/invalidconnection"}, {"method"=>"get", "relative_url"=>"koppel?access_token=#{CGI.escape APP_ACCESS_TOKEN}"}]) %>:
post:
with_token: '[{"code": 400, "body": "{\"error\":{\"type\":\"AnError\", \"message\":\"An error occurred!.\"}}"},{"code": 200, "body":"{\"id\":\"123\"}"}]'
batch=<%= JSON.dump([{"method"=>"post", "relative_url"=>"FEED_ITEM_BATCH/likes"}, {"method"=>"delete", "relative_url"=> "FEED_ITEM_BATCH"}]) %>:
post:
with_token: '[{"code": 200, "body": "{\"id\": \"MOCK_LIKE\"}"},{"code": 200, "body":true}]'
batch=<%= JSON.dump([{"method" => "post", "relative_url" => "method/fql.query", "body" => "query=select+first_name+from+user+where+uid%3D2905623"}]) %>:
post:
with_token: '[{"code": 200, "body":"[{\"first_name\":\"Alex\"}]"}]'
# dependencies
batch=<%= JSON.dump([{"method"=>"get", "relative_url"=>"me", "name" => "getme"}, {"method"=>"get", "relative_url"=>"koppel", "depends_on" => "getme"}]) %>:
post:
with_token: '[null,{"code": 200, "body":"{\"id\":\"123\"}"}]'
batch=<%= JSON.dump([{"method"=>"get", "relative_url"=>"2/invalidconnection", "name" => "getdata"}, {"method"=>"get", "relative_url"=>"koppel", "depends_on" => "getdata"}]) %>:
post:
with_token: '[{"code": 400, "body": "{\"error\":{\"type\":\"AnError\", \"message\":\"An error occurred!.\"}}"},null]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me/friends?limit=5", "name" => "get-friends"}, {"method" => "get", "relative_url" => "?ids=#{CGI.escape "{result=get-friends:$.data.*.id}"}"}]) %>:
post:
with_token: '[null,{"code": 200, "body":"{}"}]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me/friends?limit=5", "name" => "get-friends", "omit_response_on_success" => false}, {"method" => "get", "relative_url" => "?ids=#{CGI.escape "{result=get-friends:$.data.*.id}"}"}]) %>:
post:
with_token: '[{"code": 200, "body":"{\"data\":[],\"paging\":{}}"},{"code": 200, "body":"{}"}]'
batch=<%= JSON.dump([{"method" => "get", "relative_url" => "me/friends?limit=5"}, {"method" => "get", "relative_url" => "?ids=#{CGI.escape "{result=i-dont-exist:$.data.*.id}"}"}]) %>:
post:
with_token:
code: 400
body: '{"error_code":190,"error_description":"Error validating access token."}'
# attached files tests
batch=<%= JSON.dump([{"method"=>"post", "relative_url"=>"me/photos", "attached_files" => "op1_file0"}]) %>&op1_file0=[FILE]:
post:
with_token: '[{"code": 400, body": "{\"error\":{\"type\":\"AnError\", \"message\":\"An error occurred!.\"}}"},null]'
batch=<%= JSON.dump([{"method"=>"post", "relative_url"=>"me/photos", "attached_files" => "op1_file0"}]) %>&op1_file0=[FILE]:
post:
with_token: '[{"code": 200, "body":"{\"id\": \"MOCK_PHOTO\"}"}]'
batch=<%= JSON.dump([{"method"=>"post", "relative_url"=>"me/photos", "attached_files" => "op1_file0"}, {"method"=>"post", "relative_url"=>"koppel/photos", "attached_files" => "op2_file0"}]) %>&op1_file0=[FILE]&op2_file0=[FILE]:
post:
with_token: '[{"code": 200, "body":"{\"id\": \"MOCK_PHOTO\"}"}, {"code": 200, "body":"{\"id\": \"MOCK_PHOTO\"}"}]'
/me:
no_args:
get:
<<: *token_required
with_token: '{"updated_time": 1}'
fields=id:
get:
with_token: '{"id": "2901279"}'
/me/feed:
message=Hello, world, from the test suite!:
post:
with_token: '{"id": "MOCK_FEED_ITEM"}'
message=Hello, world, from the test suite, testing comments!:
post:
with_token: '{"id": "MOCK_FEED_ITEM"}'
message=Hello, world, from the test suite, testing comments again!:
post:
with_token: '{"id": "MOCK_FEED_ITEM"}'
message=Hello, world, from the test suite, testing liking!:
post:
with_token: '{"id": "MOCK_FEED_ITEM"}'
message=the cats are asleep:
post:
with_token: '{"id": "FEED_ITEM_CATS"}'
message=Hello, world, from the test suite delete method!:
post:
with_token: '{"id": "FEED_ITEM_DELETE"}'
message=Hello, world, from the test suite delete like method!:
post:
with_token: '{"id": "FEED_ITEM_DELETE"}'
message=Hello, world, from the test suite batch API!:
post:
with_token: '{"id": "FEED_ITEM_BATCH"}'
link=http://oauth.twoalex.com/&message=Hello, world, from the test suite again!&name=OAuth Playground:
post:
with_token: '{"id": "FEED_ITEM_CONTEXT"}'
link=http://oauth.twoalex.com/&message=body&name=It's a big question&picture=http://oauth.twoalex.com//images/logo.png&properties=<%= JSON.dump({"Link1"=>{"text"=>"Left", "href"=>"http://oauth.twoalex.com/"}, "other" => {"text"=>"Straight ahead", "href"=>"http://oauth.twoalex.com/?"}}) %>&type=link:
post:
with_token: '{"id": "FEED_ITEM_DICTIONARY"}'
/me/picture:
redirect=false:
no_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com" } }'
with_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com" } }'
/me/photos:
source=[FILE]:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO"}'
message=This is the test message&source=[FILE]:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO"}'
url=http://img.slate.com/images/redesign2008/slate_logo.gif:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO_FROM_URL"}'
message=my message&url=http://img.slate.com/images/redesign2008/slate_logo.gif:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO_FROM_URL"}'
/me/videos:
source=[FILE]:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO"}'
message=This is the test message&source=[FILE]:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO"}'
file_url=http://techslides.com/demos/sample-videos/small.mp4:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO_FROM_URL"}'
description=my message&file_url=http://techslides.com/demos/sample-videos/small.mp4:
post:
<<: *token_required
with_token: '{"id": "MOCK_PHOTO_FROM_URL"}'
/koppel:
no_args:
get:
with_token: '{"id": 1, "name": 1, "updated_time": 1}'
no_token: '{"id": 1, "name": 1}'
metadata=1:
get:
with_token: '{"name": "Alex Koppel","metadata": {"fields": [{"name": "id"}],"type": "user","connections": {}},"id": "2905623"}'
/facebook:
no_args:
get:
with_token: '{"id": 1, "name": 1}'
no_token: '{"id": 1, "name": 1}'
/facebook/photos:
no_args:
get:
with_token: '{"data": [{}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
no_token: '{"data": [{}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
/lukeshepard/friends:
no_args:
get:
<<: *token_required
with_token: '{"data": [{}], "paging": {}}'
/lukeshepard/picture:
no_args:
get:
no_token:
code: 302
headers:
Location: http://facebook.com/
with_token:
code: 302
headers:
Location: http://facebook.com/
type=large:
get:
no_token:
code: 302
headers:
Location: https://facebook.com/large
with_token:
code: 302
headers:
Location: https://facebook.com/large
redirect=false:
get:
no_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com" } }'
with_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com" } }'
redirect=false&type=large:
get:
no_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com/large" } }'
with_token: '{ "data": { "is_silhouette": true, "url": "https://facebook.com/large" } }'
/comments:
ids=http://developers.facebook.com/blog/post/472:
get:
with_token: '{"http://developers.facebook.com/blog/post/472": []}'
no_token: '{"http://developers.facebook.com/blog/post/472": []}'
ids=http://developers.facebook.com/blog/post/490,http://developers.facebook.com/blog/post/472:
get:
with_token: '{"http://developers.facebook.com/blog/post/490": [], "http://developers.facebook.com/blog/post/472": []}'
no_token: '{"http://developers.facebook.com/blog/post/490": [], "http://developers.facebook.com/blog/post/472": []}'
ids=:
get:
code: 400
body: '{"error": {"type": "OAuthException","message": "Cannot specify an empty identifier"}}'
no_args:
get:
code: 500
body: '{"error": {"type": "Exception","message": "No node specified"}}'
/search:
q=facebook:
get:
with_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
no_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
"limit=25&q=facebook&until=<%= TEST_DATA['search_time'] %>":
get:
with_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
no_token: '{"data": [{"id": "507731521_100412693339488"}], "paging": {"previous": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000", "next": "https:\/\/graph.facebook.com\/7204941866\/photos?limit=25&until=2008-09-15T18%3A30%3A25%2B0000"}}'
/fql:
q=select uid, first_name from user where uid = 2901279:
get:
no_token: '[{"uid":2901279,"first_name":"Luke"}]'
with_token: '[{"uid":2901279,"first_name":"Luke"}]'
q=select read_stream from permissions where uid = 2901279:
get:
<<: *token_required
with_token: '[{"read_stream":1}]'
'q=<%= JSON.dump({"query1" => "select post_id from stream where source_id = me()", "query2" => "select fromid from comment where post_id in (select post_id from #query1)", "query3" => "select uid, name from user where uid in (select fromid from #query2)"}) %>':
get:
<<: *token_required
with_token: '[{"name":"query1", "fql_result_set":[]},{"name":"query2", "fql_result_set":[]},{"name":"query3", "fql_result_set":[]}]'
'q=<%= JSON.dump({"query1" => "select uid, first_name from user where uid = 2901279", "query2" => "select uid, first_name from user where uid = 2905623"}) %>':
get:
with_token: '[{"name":"query1", "fql_result_set":[{"uid":2901279,"first_name":"Luke"}]},{"name":"query2", "fql_result_set":[{"uid":"2905623","first_name":"Alex"}]}]'
no_token: '[{"name":"query1", "fql_result_set":[{"uid":2901279,"first_name":"Luke"}]},{"name":"query2", "fql_result_set":[{"uid":"2905623","first_name":"Alex"}]}]'
'/115349521819193_113815981982767':
no_args:
delete:
<<: *token_required
/my_page:
fields=access_token:
get:
<<: *token_required
with_token: '{"access_token": "<%= APP_ACCESS_TOKEN %>"}'
'/<%= APP_ID %>':
restrictions=<%= JSON.dump({"age_distr" => "13+"}) %>:
post:
with_token: "true"
/debug_token:
input_token=<%= APP_ACCESS_TOKEN %>:
get:
with_token: '{ "data": { "app_id": <%= APP_ID %>, "application": "Social Cafe", "expires_at": 1352419328, "is_valid": true, "issued_at": 1347235328, "metadata": { "sso": "iphone-safari" }, "scopes": [ "email", "publish_actions" ], "user_id": 1207059 } }'
# -- OAuth responses --
/oauth/access_token:
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&code=<%= OAUTH_CODE %>&redirect_uri=<%= OAUTH_DATA["callback_url"] %>:
get:
no_token: access_token=<%= ACCESS_TOKEN %>
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&code=foo&redirect_uri=<%= OAUTH_DATA["callback_url"] %>:
get:
<<: *oauth_error
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&grant_type=client_credentials:
post:
no_token: access_token=<%= APP_ACCESS_TOKEN %>
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&fb_exchange_token=<%= ACCESS_TOKEN %>&grant_type=fb_exchange_token:
post:
no_token: access_token=<%= ACCESS_TOKEN %>&expires=5184000
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&fb_exchange_token=foo&grant_type=fb_exchange_token:
post:
<<: *oauth_error
/oauth/exchange_sessions:
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= OAUTH_DATA["session_key"] %>&type=client_cred:
post:
no_token: '[{"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]'
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= [OAUTH_DATA["session_key"], OAUTH_DATA["session_key"]].join(",") %>&type=client_cred:
post:
no_token: '[{"access_token":"<%= ACCESS_TOKEN %>","expires":4315}, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]'
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=<%= ["foo"].concat([OAUTH_DATA["session_key"], OAUTH_DATA["session_key"]]).join(",") %>&type=client_cred:
post:
no_token: '[null, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}, {"access_token":"<%= ACCESS_TOKEN %>","expires":4315}]'
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=foo,bar&type=client_cred:
post:
no_token: '[null, null]'
client_id=<%= APP_ID %>&client_secret=<%= SECRET %>&sessions=foo&type=client_cred:
post:
no_token: '[null]'
# -- Subscription Responses --
/<%= APP_ID %>/subscriptions:
callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>&fields=name&object=user&verify_token=<%= SUBSCRIPTION_DATA["verify_token"] %>:
post:
with_token:
code: 200
callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>&fields=name&object=user:
post:
with_token:
code: 200
callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>foo&fields=name&object=user&verify_token=<%= SUBSCRIPTION_DATA["verify_token"] %>:
post:
with_token:
code: 400
body: '{"error":{"type":"Exception","message":"(#2200) subscription validation failed"}}'
callback_url=foo&fields=name&object=user&verify_token=<%= SUBSCRIPTION_DATA["verify_token"] %>:
post:
with_token:
code: 400
body: '{"error":{"type":"Exception","message":"(#100) callback_url URL is not properly formatted"}}'
object=user:
delete:
with_token:
code: 200
object=kittens:
delete:
with_token:
code: 400
body: '{"error":{"type":"Exception","message":"(#100) Invalid parameter"}}'
no_args:
delete:
with_token:
code: 200
get:
with_token: '{"data":[{"callback_url":"http://oauth.twoalex.com/subscriptions", "fields":["name"], "object":"user", "active":true}]}'
callback_url=<%= SUBSCRIPTION_DATA["subscription_path"] %>:
get:
with_token: '{"data":[{"callback_url":"http://oauth.twoalex.com/subscriptions", "fields":["name"], "object":"user", "active":true}]}'
# -- Mock Item Responses --
/MOCK_FEED_ITEM/likes:
no_args:
post:
with_token: '{"id": "MOCK_LIKE"}'
/MOCK_FEED_ITEM/comments:
message=it's my comment!:
post:
with_token: '{"id": "MOCK_COMMENT"}'
/MOCK_FEED_ITEM:
no_args:
<<: *item_deleted
/FEED_ITEM_CONTEXT:
no_args:
<<: *item_deleted
get:
with_token: '{"link":"http://oauth.twoalex.com/", "name": "OAuth Playground"}'
/FEED_ITEM_DICTIONARY:
no_args:
<<: *item_deleted
get:
with_token: '{"link":"http://oauth.twoalex.com/", "name": "OAuth Playground", "properties": {}}'
/FEED_ITEM_CATS:
no_args:
<<: *item_deleted
get:
with_token: '{"message": "the cats are asleep"}'
/FEED_ITEM_DELETE:
no_args:
<<: *item_deleted
/FEED_ITEM_DELETE/likes:
no_args:
<<: *item_deleted
post:
with_token: 'true'
/MOCK_COMMENT:
no_args:
<<: *item_deleted
get:
with_token: "{\"message\": \"it's my comment!\"}"
/MOCK_PHOTO:
no_args:
<<: *item_deleted
get:
with_token: "{\"name\": \"This is the test message\"}"
# -- Mock Test User Responses --
/<%= APP_ID %>/accounts/test-users:
installed=false:
<<: *test_user_uninstalled
installed=false&permissions=read_stream:
<<: *test_user_uninstalled
installed=true&permissions=:
<<: *test_user_installed
installed=true&permissions=read_stream:
<<: *test_user_installed
installed=true&permissions=read_stream,user_interests:
post:
with_token: '{"id": "888888888", "access_token":"<%= ACCESS_TOKEN %>", "login_url":"https://www.facebook.com/platform/test_account.."}'
no_args:
get:
with_token: '{"data":[{"id": "999999999", "access_token":"<%= ACCESS_TOKEN %>", "login_url":"https://www.facebook.com/platform/test_account.."}, {"id": "888888888", "access_token":"119908831367602|o3wswWQ88LYjEC9-ukR_gjRIOMw.", "login_url":"https://www.facebook.com/platform/test_account.."}], "paging":{"next":"https://graph.facebook.com/119908831367602/accounts/test-users?access_token=119908831367602|o3wswWQ88LYjEC9-ukR_gjRIOMw&limit=50&offset=50&__after_id=100003241848740"}}'
/999999999:
no_args:
<<: *item_deleted
get:
with_token: '{"name":"Foo Baz"}'
name=Foo Baz:
post:
with_token: 'true'
/999999999/friends/888888888:
no_args:
post:
with_token: 'true'
/9999999991:
no_args:
delete:
with_token:
code: 400
body: '{"error": {"type": "OAuthException", "message": "Error validating verification code."}}'
/888888888:
no_args:
<<: *item_deleted
/888888888/friends/999999999:
no_args:
<<: *test_user_befriended
/777777777:
no_args:
<<: *item_deleted