D
D
d_h_o_l2017-04-18 13:44:52
PHP
d_h_o_l, 2017-04-18 13:44:52

How to correctly access the instagram users api in php?

I'm trying to get information about the user through the instagram api

<header class="clearfix">
        <img src="<?php echo $data->user->profile_picture ?>" alt="Instagram logo">

        <h1>Имя <?php echo $data->user->username?></h1>
        <h3>Имя пользователя <?php echo $data->user->full_name ?></h3>
        <h3>Постов: <?php echo $data->user->counts->media ?></h3>
        <h3>Подписчиков <?php echo $data->user->counts->follows ?> Подписок <?php echo $data->user->counts->followed_by ?></h3>

    </header>

image, name, and username are displayed well, but with the number of subscribers, subscriptions and posts, there are problems
a6913c4d0ecd4273a3cd2fee346e11d6.JPG
here is a screenshot of the instagram documentatione5b270c9c2534f9989c5978a24bfc4df.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pushkarev, 2017-04-18
@d_h_o_l

You are not looking at the documentation, but at the request. Do print_r($data);it and get data from it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question