Skip to content

Commit c993740

Browse files
author
jlengstorf
committed
Started cleanup and README walkthrough.
1 parent c00522e commit c993740

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

Diff for: README.md

+12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ This is the demo application that will be built during [Jason Lengtorf][1]'s wor
66
using [Instagram's API][3] and [Pusher][4].
77

88

9+
Walkthrough
10+
-----------
11+
12+
To build this app, you'll need to run through the following steps:
13+
14+
1. Set up a live dev environment (AppFog is great if you don't have access to
15+
your own)
16+
1. Register a new app with Instagram
17+
1. Register a new app with Pusher
18+
19+
20+
921
Copyright and license
1022
---------------------
1123

Diff for: index.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@
4747
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
4848
$response = json_decode(curl_exec($ch));
4949
$photos = property_exists($response, 'data') ? $response->data : array();
50-
$next_min_id = property_exists($response, 'pagination') ? $response->pagination->next_min_id : NULL;
51-
$next_max_id = property_exists($response, 'pagination') ? $response->pagination->next_max_id : NULL;
5250

5351
/*
5452
@@ -99,7 +97,7 @@ class="button"
9997
</p>
10098
</div>
10199

102-
<ul id="photos" data-next-min-ID="<?=$next_max_id?>">
100+
<ul id="photos">
103101

104102
<?php //foreach ($photos as $photo): ?>
105103
<li class="loading">Loading&hellip;</li>
@@ -174,10 +172,10 @@ class="login button">Login &rarr;</a>
174172
var new_photos = response.data,
175173
pagination = response.pagination,
176174
delay = 0,
177-
anim_speed = 200;
175+
anim_speed = 200;
178176

179177
// Removes the loading LI if present
180-
$("#photos").find('.loading').hide(400).delay(400).remove();
178+
$("#photos").find('.loading').hide(400).delay(400).remove();
181179

182180
// Resets the new photo count
183181
newcount = 0;
@@ -189,7 +187,9 @@ class="login button">Login &rarr;</a>
189187
var photoCont = $("#photos"),
190188
photo = new_photos[x],
191189
caption = (photo.caption!==null) ? photo.caption.text : '';
192-
190+
191+
//TODO: Make the captions show up and fix delay
192+
193193
$('<img />', {
194194
src: photo.images.thumbnail.url,
195195
alt: caption,

Diff for: login.php

-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
$return = curl_exec($ch);
1919
$auth = json_decode($return);
2020

21-
$_SESSION['user'] = $auth->user;
22-
2321
header('Location: http://demo.copterlabs.com/filive/workshop/?access_token=' . $auth->access_token);
2422
exit;
2523

0 commit comments

Comments
 (0)