来自linkedin的JSON api响应

问题描述 投票:1回答:1

使用以下URL我以XML的形式从linkedin获得了配置文件响应。

this.http.get('https://api.linkedin.com/v1/people/~?oauth2_access_token='+token,{headers: headers})

如何以JSON格式获取响应?我尝试过使用URL但是我收到了错误。

https://api.linkedin.com/v1/people/~?format=json~?oauth2_access_token=
angular oauth-2.0 linkedin linkedin-api
1个回答
1
投票

format应作为查询参数发送:

尝试:

https://api.linkedin.com/v1/people/~?format=json&oauth2_access_token=xxxx
© www.soinside.com 2019 - 2024. All rights reserved.