Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get user email using Instagram API login?

Tags:

I tried to use Instagram oauth API login but I can't get User email where as I can get profile picture, user url, comments and all.

So can anyone tell me if there is any option to get user email?

Here is snippet for you:

print_r($result->data); exit;     // display all user likes     foreach ($result->data as $media) {         $content = "<li>";          // output media         if ($media->type === 'video') {             // video             $poster = $media->images->low_resolution->url;             $source = $media->videos->standard_resolution->url;             $content .= "<video class=\"media video-js vjs-default-skin\" width=\"250\" height=\"250\" poster=\"{$poster}\"                        data-setup='{\"controls\":true, \"preload\": \"auto\"}'>                          <source src=\"{$source}\" type=\"video/mp4\" />                        </video>";         } else {             // image             $image = $media->images->low_resolution->url;             $content .= "<img class=\"media\" src=\"{$image}\"/>";         }          // create meta section         $avatar = $media->user->profile_picture;         $username = $media->user->username;         $comment = $media->caption->text;          $content .= "<div class=\"content\">                        <div class=\"avatar\" style=\"background-image: url({$avatar})\"></div>                        <p>{$username}</p>                        <div class=\"comment\">{$comment}</div>                      </div>"; 

Here I can get avatar,username and comment. But I need email to be fetched.

Thanks in advance

like image 871
Suman Kalyan Avatar asked Oct 22 '14 09:10

Suman Kalyan


People also ask

What information can I get from Instagram API?

The API can be used to get and publish their media, manage and reply to comments on their media, identify media where they have been @mentioned by other Instagram users, find hashtagged media, and get basic metadata and metrics about other Instagram Businesses and Creators.

How do I follow someone on Instagram API?

Instagram now requires that you request special permission from them in order to follow users using their API. So you will not be able to follow/unfollow a user with the API until Instagram grants you these permissions.

How do I get an Instagram user ID graph API?

You can either use the id field for unique user ID from Instagram Graph API or you can use ig_id . The latter is the ID that was used in legacy Instagram API. This API is only for an Instagram Business Account or an Instagram Creator Account .

Is instagrams API public?

Instagram API ChangesIn 2018, Instagram shut down its public API. Meaning, third-party apps can no longer access the API from Instagram without permission. Third-party apps now need to be approved by Instagram before they can access the API.


1 Answers

The API don't return the user email. This is an example of all the fields that you can get: http://instagram.com/developer/endpoints/users/#get_users

like image 75
Alberto Avatar answered Oct 14 '22 18:10

Alberto