Sharmila Devi
Sharmila Devi

Reputation: 5

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

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.

Upvotes: 0

Views: 182

Answers (1)

Naveen Ramanathan
Naveen Ramanathan

Reputation: 2206

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)")

Upvotes: 0

Related Questions