i sending send message request xml bodyfrom iphone application
<mailbox-item><recipients><recipient><person path='/people/93619553' /></recipient><recipient><person path='/people/116008244' /></recipient><recipient><person path='/people/96885725' /></recipient></recipients><subject>message butterfli</subject><body>aasd</body></mailbox-item>
but getting error
++ linkedin engine reports failure connection 3cd3052a-7061-4ea0-8863-5584270b9177 operation couldn’t completed. (http error 404.)
code is
- (rdlinkedinconnectionid *)sendmessage:(nsdictionary *)sharedict { nsurl* url = [nsurl urlwithstring:[kapibaseurl stringbyappendingstring:@"/v1/people/~/mailbox"]]; nsstring *xmlstr = @"<mailbox-item><recipients>"; nsarray *toidarray = [[sharedict objectforkey:@"privacy"] componentsseparatedbystring:@","]; (int l=0; l<[toidarray count]; l++) { xmlstr = [xmlstr stringbyappendingstring:[nsstring stringwithformat:@"<recipient><person path='/people/%@' /></recipient>", [toidarray objectatindex:l]]]; } xmlstr = [xmlstr stringbyappendingstring:[nsstring stringwithformat:@"</recipients><subject>%@</subject><body>%@</body></mailbox-item>", @"message butterfli",[sharedict objectforkey:@"text_message"]]]; [nsstring stringwithformat:@"<share><comment>%@</comment><content><submitted-url>%@</submitted-url></content><visibility><code>anyone</code></visibility></share>", [sharedict objectforkey:@"link_msg"],[sharedict objectforkey:@"link"]]; nsdata *body = [xmlstr datausingencoding:nsutf8stringencoding]; nslog(@"xmlstr..%@",xmlstr); return [self sendapirequestwithurl:url httpmethod:@"post" body:body]; }
amit battan
its not closed issue before it...
but solution is
its done...
before hardcoded user id shown in url of user profile on web.
working ok id of user coming through api ..
not getting why linkedin user different ids??
as
linkedin use unique user ids each user/application combination protect user's privacy. application requested (and got) authentication member can use token retrieve further information.
Comments
Post a Comment