2014-08-29 55 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

回答

相關問題