Topic-icon Is there a way to alter or resize Image from Facebook Profile upon log

Active Subscriptions:

None
When i use SClogin and choose 50 50 it makes a little square. But when I raise it to 100 or 200 the picture is ported in as a long pic about 50 x 100. not square at all. same thing when choosing 200 px.

Also, when Kunena brings in the pic it is a long 50 x 100 pic and not square. The way this forum brings in the pic seems to be a lot better and exactly the sizing i am looking for about 75 x 75 or 100 x 100
The topic has been locked.
Support Specialist
Christian,
Can you let me know how you have the SCLogin profile picture configured? Mainly, for the "Enable Profile Picture" setting, what value are you using, Facebook or Joomla? If Facebook, I believe it should always come back square (would have to check). If you're using "Joomla", then that would be pulling the Kunena profile pic, which would explain why both are coming out the same oblong shape.

For our Kunena import, I believe we let Kunena resize it according to the width (or height) configured in Kunena.. the other dimension is left in the same ratio, which means if the user's Facebook avatar is a non-square aspect to begin with, it will be imported that way. There are likely ways to fix this, but just need to know exactly what's going on first.

Also, what version of Kunena are you using?

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
I am using the newest version of Kunena 3.0.1 . Also, I have the logout view set to Facebook and size 100 x 100
The topic has been locked.
Support Specialist
We're looking into this a little more. It may take a day or so to get you a response as I'm not sure what's going on and can't quickly recreate the issue. I'll let you know what we find or if we need more information.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
sure thing... thank you
The topic has been locked.
Active Subscriptions:

None

alzander wrote: We're looking into this a little more. It may take a day or so to get you a response as I'm not sure what's going on and can't quickly recreate the issue. I'll let you know what we find or if we need more information.

Thanks,
Alex


Hey Alex, any update on this.

It seems as of right now JFBConnect takes the picture in whole form Facebook... and it seems that the picture facebook has in whole is different than the one you see on your own facebook profile. My theory is that this happens because FB takes your pic and asks you where you want it to be focused in on and lets you move it until your happy. So the pic isn't a square to begin with

I don't know if you already know that point i am making or if there is a way to deal with that and something is awru?

thanks for your help.
The topic has been locked.
Support Specialist
Alright.. I looked into our code a bit more on how this works. Our SCLogin module tries to fetch the optimal picture from Facebook to display based on your height/width settings. When you're values are 'small', we pick what's called a pre-defined 'small' size. As you set larger values, we use larger predfined settings like 'large'. The 'small' value is always going to return a square picture. The larger values will return variable size pictures. The reason we scale up is so that the picture isn't too pixellated, but it also means that the picture is no longer square.

With that said, it looks like Facebook has added some new ways to crop pictures since the last time we checked. If interested in *testing* some changes, please edit the /modules/mod_sclogin/helper.php file. At line 195, you'll see:
$fbAvatarURL = 'https://graph.facebook.com/'.$fbUserId.'/picture?type='.$fbAvatarSize;
Edit that and change it to:
$fbAvatarURL = 'https://graph.facebook.com/'.$fbUserId.'/picture?width='.$this->params->get("profileWidth").'&height='.$this->params->get("profileHeight");;
That will use the parameters from the module and tell FB exactly what to fetch instead of using their predefined sizes, which is better overall. It's likely something we'll implement in the upcoming SCLogin release as well, but would love to hear you're feedback on the above.

Let me know how that goes, and good luck,
Alex
The topic has been locked.
Support Specialist
Oh yeah, for reference, the Facebook documentation on that avatar URL is developers.facebook.com/docs/reference/api/using-pictures/

Alex
The topic has been locked.
Active Subscriptions:

None
you did a ;; at the end of your code is that correct? sorry not to hip on php
The topic has been locked.
Support Specialist
That's a typo. Should be just one ; However, 2 wouldn't cause a problem either because it would look like a really short/no line of code. So, it's one of those typos that are good-typos in that they don't cause things to come flaming down around our heads.

Keep me posted on how that goes,
Alex
The topic has been locked.