2014-08-29 76 views
1

我试图通过使用以下代码获取用户配置文件信息。我正在使用抄写员获取信息。我能够获得familyName和givenName等,但它不会将我的电子邮件ID返回给我。如何使用oauth获取电子邮件ID

我用下面的代码:

OAuthRequest request = new OAuthRequest(
    Verb.GET, 
    "https://social.yahooapis.com/v1/me/guid? format=xml" 
); 
service.signRequest(accessToken, request); 
request.addHeader("realm", "yahooapis.com"); 
Response response = request.send(); 

这是我得到的回应:

{ 
    "profile": { 
     "guid":"CGGT5LNT7NXGFK64QW7FQN5UQM", 
     "ageCategory":"A", 
     "familyName":"gto", 
     "givenName":"CTSDemo", 
     "image": { 
      "height":192, 
      "imageUrl":"https://s.yimg.com/dh/ap/social/profile/profile_b192.png", 
      "size":"192x192", 
      "width":192 
     }, 
     "intl":"us", 
     "jurisdiction":"us", 
     "lang":"en-US", 
     "location":"Bangalore", 
     "memberSince":"2014-08-03T08:23:27Z", 
     "nickname":"CTSDemo", 
     "notStored":false, 
     "nux":"3", 
     "profileMode":"PUBLIC", 
     "profileStatus":"ACTIVE", 
     "profileUrl":"http://profile.yahoo.com/CGGT5LNT7NXGFK64QW7FQN5UQM", 
     "updated":"2014-08-29T12:00:44Z", 
     "isConnected":false, 
     "profileHidden":false, 
     "bdRestricted":true, 
     "profilePermission":"PUBLIC", 
     "uri":"https://social.yahooapis.com/v1/user/CGGT5LNT7NXGFK64QW7FQN5UQM/profile", 
     "cache":true 
    } 
} 
+0

对此有何更新? – Logan 2014-11-12 04:16:25

+0

是的,我不得不允许雅虎应用程序返回响应 – 2014-11-18 17:36:13

+0

我给了我的应用程序的许可,仍然无法获得电子邮件地址。 – Logan 2014-11-19 05:34:49

回答

相关问题