I have set the user image size to large but fbconnect is still pulling the small picture. I would also like to know how to set the refresh between drupal site account and facebook data.

Comments

bflora’s picture

Yeah, what's the story here? My users are getting smallish images. Is it possible to access the full-size ones?

bflora’s picture

I did a little poking into this:

FB connect seems to be getting the 'pic' field from facebook.

According to the developers wiki, it is possible to ask for the big_pic field.

If I knew where in the FB Connect module code to make this change, I could do it and try it out. I'm guessing there's just one spot where the module is told to ask for pic instead of big_pic.

gilgabar’s picture

The function that generates the user picture is around line 470 of fbconnect.module. It gets called on line 33 of fbconnect_profile.module.

/**
 * Render a facebook user picture
 *
 * @param string $size 
 *   Size of the pic. one of ('thumb', 'medium', 'large')
 */
function fbconnect_render_avatar($fbuid, $size='medium') {
  return '<fb:profile-pic facebook-logo="true" size="'. $size .'" uid="'. $fbuid .'"></fb:profile-pic>';
}

The parameters given in the comment are incorrect. If you look at the Facebook Developers Wiki: http://wiki.developers.facebook.com/index.php/Fb:profile-pic, it says possible values are thumb, small, normal, and square. A width and height are also possible as it is essentially the same as an img tag. Medium and large are not valid, and changing it to normal actually solved another problem I was having with profile pics not showing up in the friends block.

As for setting the refresh frequency, I would guess that line 9 of fbconnect_profile.module does it:

define('FBCONNECT_USER_CACHE_EXPIRE', 24);
LaNets’s picture

Assigned: Unassigned » LaNets
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.