Skip to content

Commit b939b84

Browse files
committed
Update examples with public acccount
1 parent ddf8347 commit b939b84

5 files changed

Lines changed: 37 additions & 34 deletions

File tree

README.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ composer require pgrimaud/instagram-user-feed
4646
```php
4747
$api = new Instagram\Api();
4848
$api->login('username', 'password'); // optional, may be required on shared hosting
49-
$api->setUserName('pgrimaud');
49+
$api->setUserName('robertdowneyjr');
5050

5151
$feed = $api->getFeed();
5252

5353
echo $feed->getUserName();
54-
// pgrimaud
54+
// robertdowneyjr
5555

5656
echo $feed->getFullName();
57-
// Pierre Grimaud
57+
// Robert Downey Jr. Official
5858

5959
```
6060

@@ -64,7 +64,7 @@ echo $feed->getFullName();
6464
```php
6565
$cache = new Instagram\Storage\CacheManager('/path/to/your/cache/folder');
6666
$api = new Instagram\Api($cache);
67-
$api->setUserName('pgrimaud');
67+
$api->setUserName('robertdowneyjr');
6868

6969
$feed = $api->getFeed();
7070

@@ -75,82 +75,85 @@ print_r($feed);
7575
```php
7676
Instagram\Hydrator\Component\Feed Object
7777
(
78-
[id] => 184263228
79-
[userName] => pgrimaud
80-
[fullName] => Pierre G
81-
[biography] => Gladiator retired - ESGI 14
82-
[followers] => 342
83-
[following] => 114
84-
[profilePicture] => https://scontent-cdg2-1.cdninstagram.com/vp/f49bc1ac9af43314d3354b4c4a987c6d/5B5BB12E/t51.2885-19/10483606_1498368640396196_604136733_a.jpg
85-
[externalUrl] => https://p.ier.re/
86-
[mediaCount] => 33
78+
[id] => 1518284433
79+
[userName] => robertdowneyjr
80+
[fullName] => Robert Downey Jr. Official
81+
[biography] => @officialfootprintcoalition @coreresponse
82+
[followers] => 46338039
83+
[following] => 50
84+
[profilePicture] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-19/s320x320/72702032_542075739927421_3928117925747097600_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_ohc=hGF8upBhWgcAX_7ks82&oh=a9cdb3ed313d5c4c9712b52b7d3ceb3f&oe=5EE2E5B8
85+
[externalUrl] => http://coreresponse.org/covid19
86+
[private] =>
87+
[verified] => 1
88+
[mediaCount] => 452
8789
[medias] => Array
8890
(
8991
[0] => Instagram\Hydrator\Component\Media Object
9092
(
91-
[id] => 1766843207939161485
93+
[id] => 2306047234549362565
9294
[typeName] => GraphImage
9395
[height] => 1080
9496
[width] => 1080
95-
[thumbnailSrc] => https://scontent-cdg2-1.cdninstagram.com/vp/94afe3a6f9cc26a03c2ce29321b57074/5B81AE5C/t51.2885-15/s640x640/sh0.08/e35/30601606_2078730052397861_6535696870134513664_n.jpg
96-
[link] => https://www.instagram.com/p/BiFFolXBn2N/
97+
[thumbnailSrc] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=bbd50d5437b7ca52f8e9ba241c358508&oe=5EE38623
98+
[link] => https://www.instagram.com/p/CAAub3qli-F/
9799
[date] => DateTime Object
98100
(
99-
[date] => 2018-04-27 17:49:05.000000
101+
[date] => 2020-05-10 16:51:14.000000
100102
[timezone_type] => 3
101103
[timezone] => Europe/Paris
102104
)
103105

104-
[displaySrc] => https://scontent-cdg2-1.cdninstagram.com/vp/fefa950b40d2d469a9db457df43a23f9/5B936A76/t51.2885-15/e35/30601606_2078730052397861_6535696870134513664_n.jpg
105-
[caption] => 🔮
106-
[comments] => 0
107-
[likes] => 25
106+
[displaySrc] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/e35/s1080x1080/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=5afbf701b8374062f15b309247367fc4&oe=5EE51716
107+
[caption] => This Mother’s Day, more than ever, let’s honor the women that raise the children that inherit the Earth #happymothersday
108+
[comments] => 7096
109+
[likes] => 3134975
108110
[thumbnails] => Array
109111
(
110112
[0] => stdClass Object
111113
(
112-
[src] => https://scontent-cdg2-1.cdninstagram.com/vp/aa2b29265c6b29465921df833b65010e/5B996421/t51.2885-15/s150x150/e35/30601606_2078730052397861_6535696870134513664_n.jpg
114+
[src] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/e35/s150x150/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=d64a87ae9a06f1ae2ac08db593204042&oe=5EE33A86
113115
[config_width] => 150
114116
[config_height] => 150
115117
)
116118

117119
[1] => stdClass Object
118120
(
119-
[src] => https://scontent-cdg2-1.cdninstagram.com/vp/84359fab575fcb75b672baa83dcf914d/5B9897B5/t51.2885-15/s240x240/e35/30601606_2078730052397861_6535696870134513664_n.jpg
121+
[src] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/e35/s240x240/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=76c8f9337cecbe15615ac46a20973fed&oe=5EE41850
120122
[config_width] => 240
121123
[config_height] => 240
122124
)
123125

124126
[2] => stdClass Object
125127
(
126-
[src] => https://scontent-cdg2-1.cdninstagram.com/vp/e900d5b8fdd60f9f1ff55d69d4a77f7f/5B977F11/t51.2885-15/s320x320/e35/30601606_2078730052397861_6535696870134513664_n.jpg
128+
[src] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/e35/s320x320/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=050d57f21816dfc2f9eb50942eb237af&oe=5EE583F6
127129
[config_width] => 320
128130
[config_height] => 320
129131
)
130132

131133
[3] => stdClass Object
132134
(
133-
[src] => https://scontent-cdg2-1.cdninstagram.com/vp/faec6a654dc3ca8c8752e784d808afe2/5B885F49/t51.2885-15/s480x480/e35/30601606_2078730052397861_6535696870134513664_n.jpg
135+
[src] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/e35/s480x480/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=dd6e527f2eba91b1d7fc6e0798d49a85&oe=5EE3FE30
134136
[config_width] => 480
135137
[config_height] => 480
136138
)
137139

138140
[4] => stdClass Object
139141
(
140-
[src] => https://scontent-cdg2-1.cdninstagram.com/vp/94afe3a6f9cc26a03c2ce29321b57074/5B81AE5C/t51.2885-15/s640x640/sh0.08/e35/30601606_2078730052397861_6535696870134513664_n.jpg
142+
[src] => https://scontent-lhr8-1.cdninstagram.com/v/t51.2885-15/sh0.08/e35/s640x640/96326668_170992687583571_3686185583583090082_n.jpg?_nc_ht=scontent-lhr8-1.cdninstagram.com&_nc_cat=1&_nc_ohc=2qpfvDrHHtwAX9B8mkO&oh=bbd50d5437b7ca52f8e9ba241c358508&oe=5EE38623
141143
[config_width] => 640
142144
[config_height] => 640
143145
)
144146

145147
)
146148

149+
[location] =>
150+
[video] =>
151+
[videoViewCount] => 0
147152
)
148-
149-
)
150153

151154
...
152155

153-
[endCursor] => AQBkklLNRIkvdOUFDHvLEZrssIcYn2TauR6cpvDgxiGJZq8mHb8ZFWNVwql1W78We0aOgfJZyQDF32yoP_h2zRKZ2iRY6zVJdDaLaGfUU23iXA
156+
[endCursor] => QVFEMFd3cklmZ3NkZmNjZlA4aTc3LVVOZHpMN1AzZnNBTUF3U3Fjd01KcWVUc25qak40b0Z2UlUzRWVCTzktYU5yOTBLdkduZWR4SC1QTUFQcm93eUtxXw==
154157
)
155158

156159
```
@@ -163,7 +166,7 @@ If you want to use paginate, retrieve `endCursor` from previous call and add it
163166

164167
$cache = new Instagram\Storage\CacheManager('/path/to/your/cache/folder');
165168
$api = new Instagram\Api($cache);
166-
$api->setUserName('pgrimaud');
169+
$api->setUserName('robertdowneyjr');
167170

168171
// First call :
169172

examples/getMedias.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
$cache = new Instagram\Storage\CacheManager(__DIR__ . '/../cache/');
66

77
$api = new Instagram\Api($cache);
8-
$api->setUserName('pgrimaud');
8+
$api->setUserName('robertdowneyjr');
99

1010
try {
1111
// First page

examples/getMediasWithLogin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
$api = new Instagram\Api($cache);
1010
$api->login('username', 'password');
11-
$api->setUserName('pgrimaud');
11+
$api->setUserName('robertdowneyjr');
1212

1313
// First page
1414

examples/getProfile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require __DIR__ . '/../vendor/autoload.php';
44

55
$api = new Instagram\Api();
6-
$api->setUserName('pgrimaud');
6+
$api->setUserName('robertdowneyjr');
77

88
try {
99
// only the first page

examples/getProfileWithLogin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
$api = new Instagram\Api($cache);
99
$api->login('username', 'password');
10-
$api->setUserName('pgrimaud');
10+
$api->setUserName('robertdowneyjr');
1111

1212
// only the first page
1313
/** @var \Instagram\Hydrator\Component\Feed $feed */

0 commit comments

Comments
 (0)