简体   繁体   English

资源根中的LinkedIn API错误未知字段

[英]LinkedIn API Error Unknown Field in resource Root

Due to the May 2015 updates my application cannot use the login with LinkedIn option, this is the snippet I'm using: 由于2015年5月的更新,我的应用程序无法使用LinkedIn登录选项,这是我正在使用的代码段:

$linkedinService->request('/people/~:(first-name,last-name,email-address)?format=json')

When I use the web console it returns the correct data, but if I dump the result from the app I get this: 当我使用Web控制台时,它会返回正确的数据,但是如果我从应用程序中转储结果,则会得到以下信息:

array (size=5)
  'errorCode' => int 0
  'message' => string 'Unknown field {~%3A%28first-name%2Clast-name%2Cemail-address%29} in resource {Root}' (length=83)
  'requestId' => string 'asdfghjk' (length=10)
  'status' => int 400
  'timestamp' => int 1435742730817

Update: The exact curl request is: (with access token) 更新:确切的curl请求是:(带有访问令牌)

https://api.linkedin.com/v1//people/~%3A%28first-name%2Clast-name%2Cemail-address%29?format=json&oauth2_access_token=

If I paste that in the web console I get 如果将其粘贴到Web控制台中,我将得到

Could not find person based on: ~%3A%28first-name%2Clast-name%2Cemail-address%29

But if I urldecode it first and paste it in it returns the correct data 但是,如果我先对其进行urldecode并将其粘贴在其中,则会返回正确的数据

Hi I got the same problem. 嗨,我遇到了同样的问题。 I find out that it is URL Problem. 我发现这是URL问题。 In request uri don't use // double slash like you did in your example m/v1//people/ . 在请求uri中,不要像在示例m/v1//people/那样使用//双斜杠。

I know its been you have posted here but someone else can get benefit of it. 我知道你已经在这里发布了,但是其他人可以从中受益。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM