Share on Linkedin using the SDK for iOS doesn't work

前端 未结 2 1169
Happy的楠姐
Happy的楠姐 2021-01-23 02:47

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 Linked

相关标签:
2条回答
  • 2021-01-23 03:26

    This works in Swift:-

            if LISDKSessionManager.hasValidSession() {
    
            LISDKAPIHelper.sharedInstance().postRequest(url, stringBody: payload, success: {
                response in
                //Do something with the response
                print("\(response.data)")
    
                }, error: {
                    error in
                    //Do something with the error
                    print("\(error.description)")
            })
        }
    
    0 讨论(0)
  • 2021-01-23 03:47

    I had the same problem when I didn't set the correct permissions.

    Make sure create session with share permissions.

    let permissions = [LISDK_BASIC_PROFILE_PERMISSION, LISDK_W_SHARE_PERMISSION]
    LISDKSessionManager.createSession(withAuth: permissions, state: nil, showGoToAppStoreDialog: true, successBlock: ...
    
    0 讨论(0)
提交回复
热议问题