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
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