After convert my code to swift 3 Twitter not get the users profile image

182 views Asked by At

I'm using FHSTwitter Engine. In that, I can get Username by using FHSTwitterEngine.shared().authenticatedUsername this. But FHSTwitterEngine.shared().getProfileImageURLString(forUsername: username as String, andSize: FHSTwitterEngineImageSizeOriginal in this I got error like Error Domain=FHSErrorDomain Code=204 "The request did not return any content. How to I get profile image? But It's work fine for swift 2.0. How to solve this Issue.

1

There are 1 answers

1
Naveen Ramanathan On BEST ANSWER

This error occurs when the user name is incorrect. This should work.

let profilepic = FHSTwitterEngine.shared().getProfileImageURLString(forUsername: FHSTwitterEngine.shared().authenticatedUsername, andSize: FHSTwitterEngineImageSizeOriginal)
print("profile pic is \(profilepic)")