tonyli508/LinkedinSwift

Unable to get access token.

Closed this issue · 2 comments

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.

can you post here your LinkedinSwiftConfiguration?