Hey all, newbie here and wondering if someone could help me out with this.

I have my theme set up so that a authenticated users profile picture shows up next to their name in the navigation block. Works fine if user uploads a photo directly to drupal, however if they connect with FB nothing. I can see the FB picture on the user profile page but not on the navigation block. I have looked and googled and looked some more but for the life of me cant figure this out. Any help?

Thanks, I appreciate it!

Comments

betoaveiga’s picture

To obtain the pictures of your users you have to use fb tags, something like

<fb:picture uid="7777777" ></fb:picture>

You can obtain the facebook id using the global $user. Your facebook ID is NOT the drupal user id.
You can inspect it's content if you want, with the devel module enabled, writing something like this:

  global $user;
  dprint_r($user);

I'm not sure about the fb tags syntax, you should check it. Using these tags makes your page a little a bit slower, but it's way to get the information works.

Hope that helps.

vectoroc’s picture

you could use graph api to display user's picture. (http://graph.facebook.com/{$account->fbuid}/picture)