Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
DeShaun Jones1,759 Points
Using Wrapper library
I have composer installed locally in my project directory. However when I follow along with the tutorial for step (User.php) <?php
require DIR . '/vendor/autoload.php'
$api = new Github\Api;
$url = 'https://api.github.com/users/treehouse'; $response = $api->get($url); $user = $api->decode($response); echo '<img src="' . $user->avatar_url . '" />';
The avatar image does not show. When I inspect the code nothing is returned. Am I doing something wrong?
As far as I can see, you are simply missing a semi colon after the require statement.