tonyli508 / LinkedinSwift

Linkedin IOS SDK for Swift from IOS 7
MIT License
74 stars 43 forks source link

Unable to get access token. #44

Closed prashantdabhi9033 closed 5 years ago

prashantdabhi9033 commented 5 years ago

Hello, when i call linkedinHelper.authorizeSuccess({ (lsToken) in

            linkedinHelper.requestURL("https://api.linkedin.com/v1/people/~:(id,email-address,public-profile-url)?format=json", requestType: LinkedinSwiftRequestGet, success: { (response) -> Void in

                self.linkedInId = (response.jsonObject)["publicProfileUrl"] as! String
                self.saveLinkedIdData()
                DispatchQueue.main.async {
                    hideLoader()
                }
                print(response)
            }) { [unowned self] (error) -> Void in
                print(error.localizedDescription)
                DispatchQueue.main.async {
                    hideLoader()
                }
                //  self.writeConsoleLine("Encounter error: \(error.localizedDescription)")
            }
        }, error: { (error) in
            **print(error.localizedDescription)**
            DispatchQueue.main.async {
                hideLoader()
            }
            print("Encounter error: \(error.localizedDescription)")
        }) {
            DispatchQueue.main.async {
                hideLoader()
            }
            print("User Cancelled!")
        }

it always return error

018-12-04 16:21:39.021753+0530 PIOL[6399:1618327] NSURLConnection finished with error - code -1003 A server with the specified hostname could not be found. Encounter error: A server with the specified hostname could not be found.

please help me.

tonyli508 commented 5 years ago

can you post here your LinkedinSwiftConfiguration?

prashantdabhi9033 commented 5 years ago

Thank you developer, But i resolved that issue and now i can run app successfully.

On Thu, 24 Jan, 2019, 9:55 PM Li Jiantang <notifications@github.com wrote:

can you post here your LinkedinSwiftConfiguration?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tonyli508/LinkedinSwift/issues/44#issuecomment-457260733, or mute the thread https://github.com/notifications/unsubscribe-auth/APrDLVW2ap4Q4x-T54IPgRMIB7L19hxeks5vGd6WgaJpZM4ZAZyq .