share data to LinkedIn User’s Profile for status update

丶灬走出姿态 提交于 2020-01-06 01:01:10

问题


I am working on a program which share data to LinkedIn User’s Profile. I am using Delphi XE2, OAuth and LinkedIn API for the same. I am able to Access token. But I am getting error on when trying to. I am using OAuth for Delphi. For SSL I am using, TIdSSLIOHandlerSOcketOpenSSL with method sslvSSLv3. I am trying to post the following:

I am posting (https://api.linkedin.com/v1/people/~/shares)as Url and ('; hiSiranyone) as Xml.

And my Idhttp Custom header*** ('oauth_consumer_key='+xxxxxxxxxxx+ ',oauth_signature_method="HMAC-SHA1"'+',oauth_timestamp='+QuotedStr(ARequest.GenerateTimeStamp)+ ',oauth_nonce='+QuotedStr(ARequest.GenerateNonce)+',oauth_version="1.0"'+ ',oauth_token='+xxxxxxxxxx+',oauth_signature='+QuotedStr(sign));

The result I am getting from Indy Http is this: Http/1.1 401 – Unauthorized Can anyone help me for fixing this? Please help....


回答1:


Look at this question and this article

IdSSLIOHandlerSocketOpenSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
with IdSSLIOHandlerSocketOpenSSL do begin 
 SSLOptions.Method := sslvSSLv3;
 SSLOptions.SSLVersions := [sslvSSLv3]; 
 SSLOptions.Mode := sslmBoth; 
 SSLOptions.VerifyMode := []; 
 SSLOptions.VerifyDepth := 0; 
 host := ''; 
end;


来源:https://stackoverflow.com/questions/10981160/share-data-to-linkedin-user-s-profile-for-status-update

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!