获取登录用户的电子邮件 ID yahoo oauth php [英] Get Logged in user's email id yahoo oauth php
问题描述
我创建了一个应用程序,允许用户使用他们的 Yahoo 凭据登录,我能够检索一些信息,如昵称和 guid,但我无法检索登录用户的电子邮件 ID.
I have created an application which allows users to log in using their Yahoo credentials, I am able to retrieve some info like nick name and guid, but I am not able to retrieve email id of the logged in user.
我已授予在我的 yahoo 应用程序中读取联系人、邮件、状态 api 的权限.
I have given permission to Read contacts,mail,status apis to my yahoo application.
我正在使用 Yahoo PHP SDK.
I am using Yahoo PHP SDK.
谁能指出我在这里遗漏了什么.
Can someone point what stuff am I missing here.
推荐答案
Activate Social Directory ->从您的项目中的 http://developer.apps.yahoo.com 读取公共
.
Activate Social Directory -> Read Public
from http://developer.apps.yahoo.com in your project.
然后(在代码中):
$profile = $user->getProfile();
您将看到电子邮件地址.
You will see the email address.
这篇关于获取登录用户的电子邮件 ID yahoo oauth php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!