从LinkedIn获取推荐API返回空地图[:]作为回复

时间:2015-08-05 13:11:23

标签: grails oauth oauth-2.0 linkedin linkedin-api

我创建了一个Web应用程序,我试图通过URL从他/她的LinkedIn个人资料中获取用户的推荐

字符串网址=“ https://api.linkedin.com/v1/people/~:(recommendations-received:(id,recommendation-type,recommendation-text,recommender))?format=json

当我在中使用此URL时 Api Explorer它运作正常。并给出输出: -

{   "recommendationsReceived":  {
    "_total": 2,
    "values":  [
       {
        "id": 558598601,
        "recommendationText": "xxx is among the best team players I ever worked with.  He has handled client effectively with smooth operations. I had always seen him as person with solution mindset and always look for  solution rather than thinking about the problem. ",
        "recommendationType":  {
          "code": "colleague"
        },
        "recommender":  {
          "firstName": "XXX",
          "id": "YYYY",
          "lastName": "XXX"
        }
      },
       {
        "id": ZZZZ,
        "recommendationText": "XXX is one of the most dedicated person at work.I always him with a flexible attitude and ready to adapt himself in all situation.I have seen him work all night to catch up all the deadlines and deliver on time ."
        "recommendationType":  {
          "code": "colleague"
        },
        "recommender":  {
          "firstName": "XXX",
          "id": "YYYY",
          "lastName": "XXXX"
        }
      }
    ]   } }

当我在我的开发者应用程序中使用此URL时出现问题。它不会给出任何错误,只需返回一个空映射[:]作为响应中的输出

无论这些推荐字段如何,我都成功获取了用户的基本个人资料数据,例如电子邮件,ID,图片,firstName,lastName.Means我的代码适用于其他字段,但不适用于这些推荐< / em> fields *

为了找到解决方案,我做了一些网上冲浪并找到了链接API文档的链接

  

Linked API Docs

     

根据文档,选择配置文件字段后才可用   已申请并已获批准申请的申请   LinkedIn程序:    推荐字段

我已经创建了一个LinkedIn开发人员帐户来获取关键字&amp;秘密 那么如何申请并获得LinkedIn推荐字段申请的批准。 我已经看过LinkedIn支持,但无法找到向Linked Developer帮助支持提问的方法

请以正确的方式建议我。

2 个答案:

答案 0 :(得分:2)

经过长时间的网上冲浪,我发现了一些富有成效的东西,我必须填写一张表格来获取这些字段。这是form

及其程序细节

答案 1 :(得分:0)

您只能使用推荐收到的关键字。请尝试以下链接。我通过此链接获取所有推荐详情。

https://api.linkedin.com/v1/people/~:(recommendations-received)?format=json