我发布到LinkedIn小组讨论终点
http://api.linkedin.com/v1/groups/{group-id}/posts
我从不同的服务器得到不同的响应。
一旦从生产服务器,我得到的响应只包含响应的一部分
{
"url":"http:\\api.linkedin.com\v1\groups\{group-id}\posts",
"http_code":201,
"download_content_length":0,
"size_download":0,
"size_upload":363
}
一旦从开发服务器,我回来的响应包含完整响应
{
"http_code":201,
"url":"http:\\api.linkedin.com\v1\groups\{group-id}\posts",
"header_size":536,
"request_size":871,
"filetime":-1,
"ssl_verify_result":0,
"redirect_count":0,
"total_time":1.513264,
"namelookup_time":0.213188,
"connect_time":0.449284,
"pretransfer_time":0.449346,
"size_upload":421,
"size_download":0,
"speed_download":0,
"speed_upload":278,
"download_content_length":0,
"upload_content_length":421,
"starttransfer_time":1.51323,
"redirect_time":0,
"headers_recv":"HTTP/1.1 201 Created Server: Apache-Coyote/1.1 x-li-request-id: PJRKH2SBF1 Location: http://\\api.linkedin.com\v1\posts\{post-id} X-LI-R2-W-IC-2: frm.scp=%7B%22refTime%22%3A1372946874%2C%22A.5070905%22%3A360%7D X-LI-R2-W-IC-2: com.linkedin.container.drc=1%7EAPRG%2C1 X-LI-R2-W-IC-2: com.linkedin.container.rpc.cluster.serviceInfo=PROD-ELA4%2Fappreg%2F0.0.2000-RC1.20722%2Fela4-app0213%2Fi001 X-LI-R2-W-IC-2: com.linkedin.container.dsc=1 Content-Length: 0 Vary: Accept-Encoding Date: Thu, 04 Jul 2013 14:07:53 GMT "
}
答案 0 :(得分:1)
您需要指定LinkedIn应为请求返回哪些信息。
的https:\ api.linkedin.com \ V1 \基{组ID} /帖:(创建时间戳,标题,摘要,站点基-URL后,创建者:(第一名字,最后名称,图片的URL,标题),喜欢,附件:(图像URL,内容域,内容的URL,标题,摘要)评论:(创建者:(一姓,名,图片的URL),创作-timestamp,文本),关系到观察者)
不要忘记使用https而不是http。