简体   繁体   中英

“Start Follow a Company” using LinkedIn API

I am working with LinkedIn API and trying to call for "Start Follow a Company". See below for my code, I get the error as ""message": "Invalid xml {Expected elements 'id...."

var payload = {company:{id:"1337"}};

IN.API.Raw("/people/~/following/companies?format=json")
.method("POST")
.body(JSON.stringify(payload))
.result(onSuccess)
.error(onError);

您可能需要将有效负载数据转换为XML,而不是将其作为JSON发送。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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