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.
Asked
Active
Viewed 181 times
0

Sharmila Devi
- 5
- 9
-
I just checked, the method signature has changed to: `func getProfileImageURLString(forUsername username: String, andSize size: FHSTwitterEngineImageSize) -> Any { }`, and the error is definitely there, may an ill formed request. Any chance i can look at the code snippet? – Annie Gupta Oct 13 '16 at 12:01
-
In my FHSTwitterEngine.m file the function is Like - (id)getProfileImageURLStringForUsername:(NSString *)username andSize:(FHSTwitterEngineImageSize)size { } – Sharmila Devi Oct 13 '16 at 12:41
-
Have you tried, updating your `FHSTwitterEngine `https://github.com/fhsjaagshs/FHSTwitterEngine – Annie Gupta Oct 13 '16 at 12:43
-
No, I'm not trying yet. – Sharmila Devi Oct 13 '16 at 12:47
-
So that would be the problem, your existing frameworks which were written for Swift 2 can't work on Swift 3. So please change them. Otherwise no use asking question here. Cheers! – Annie Gupta Oct 13 '16 at 12:49
-
Okay, Sure I will update the frameworks. Cheers. – Sharmila Devi Oct 13 '16 at 12:55
-
Now I update the framework but getting the same error. – Sharmila Devi Oct 13 '16 at 13:57
1 Answers
0
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)")

Naveen Ramanathan
- 2,166
- 1
- 19
- 21