clickrain / EE_Twitter

EE Add-on that uses oAuth to display Twitter Feed
Other
48 stars 18 forks source link

Avatar image small and fuzzy #47

Open NickToye opened 9 years ago

NickToye commented 9 years ago

The image of the avatar is coming through at 48x48 and seems very fuzzy. Apologies if this is a known issue or something that is out of your control.

bryanburgers commented 9 years ago

Hmm. Good call.

It looks like the Twitter API returns 48×48 pixel profile images (source). But it's possible to mangle the URL and get larger profile images (source).

This issue would be a good opportunity for somebody to contribute to the project with a pull request.

NickToye commented 9 years ago

I'd love to be able to contribute, but I'm just not a php developer. I can look at things, and try and make sense of it, but its way out of my comfort zone. Maybe I'll take a look at the code and if I can identify what needs to change I'll contribute with a pull request. Might be a good opportunity to develop some experience in this area.

bryanburgers commented 9 years ago

If you want to try to tackle this, you'll probably be looking at this code where that information is set, and you'll want to do some string manipulation to get the new URL. You'll probably end up with something like:

$largeUrl = // some string manipulation using $val['user']['profile_image_url_https']
$variables[$userprefix . 'image:large'] = $largeUrl;

Give it a shot. Get as far as you can and open a pull request. From there, we can see if you need further input to get to the end, or if one of the maintainers can just roll with it and finish it up. But I think you can do it.

NickToye commented 9 years ago

Ok, that's where I've got lost right off the bat. String manipulation is one of those phrases that make me reach for another shot of bourbon. :)