Get Logged in user's email id yahoo oauth php

旧街凉风 提交于 2019-12-10 14:46:47

问题


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.

I have given permission to Read contacts,mail,status apis to my yahoo application.

I am using Yahoo PHP SDK.

Can someone point what stuff am I missing here.


回答1:


Activate Social Directory -> Read Public from http://developer.apps.yahoo.com in your project.

Then (in code):

$profile = $user->getProfile();

You will see the email address.




回答2:


Not having used Yahoo API, I can only speculate, but in general for popular service APIs (like Facebook, etc), email addresses are protected information. For FB, at least, you must be granted permission to view the email address, even if the user has granted you access to other areas of the profile.



来源:https://stackoverflow.com/questions/5066030/get-logged-in-users-email-id-yahoo-oauth-php

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!