I'm using the mobile SDK for iOS (Version:1.0.7) to share something on LinkedIn
. I can get the current account information, but when I try to share on LinkedIn
,it always feedback the error description. This is my code:
let url:String = "https://api.linkedin.com/v1/people/~/shares"
let payload:String = "{\"comment\":\"Check out developer.linkedin.com! http://linkd.in/1FC2PyG\",\"visibility\":{\"code\":\"anyone\"}}"
if LISDKSessionManager.hasValidSession(){
LISDKAPIHelper.sharedInstance().postRequest(url, stringBody: payload, success: { (response) -> Void in
print("\(response.data)")
}, error: { (apiError) -> Void in
print("\(apiError.description)")
})
Has anyone ever facing the same issue. Please help me,thanks a lot!