How to get a profile picture from fb:friends selector - facebook

Im a Newbie to PHP and FBML(Facebook Markup Language).....so now im coding a Facebook app so I need to get profile picture and friend name when I select a name from FB:Friend Selector
Select a Friend <fb:friend-selector uid="exclude_ids" name="pal" idname="friend_sel" />
I use exclude_ids to see all friends in my selector so how to get profile picture? I can get name from this but how to get the profile pic large?

As you said, you are already able to get the name, for picture, you can put new graph api to use for getting photo easily:
Example url for my pic:
http://graph.facebook.com/sarfraz.anees/picture
So you should simply replace the sarfraz.anees above with the facebook id of a user to get his profile image.
So you can show the profile pic of a user like this:
<img src="http://graph.facebook.com/sarfraz.anees/picture" />

/picture?type=large or /picture?type=normal

Related

get user picture together with AppID/score

From the Facebook Graph API explorer I'm submitting a Get function for AppID/scores. Apart from user, score and application data, I would like to get user's picture as well. What Graph API query can I submit to achieve this?
You can simply reference the users id in a URL similar to this:
https://graph.facebook.com/USER_ID/picture
Here is a live example:
That image was rendered with this code:
<img src="https://graph.facebook.com/4/picture" width="50" />
http://graph.facebook.com/XXXXXX/picture
Change XXXXX To the user ID :)

How do i get someones profile picture to display back to them?

How do i get someones profile picture to diplay back to me. I have already gotten permissions to use the user's pictures etc i just don't know how to use their profile picture and display it back to them.
Any help would be awesome
Calling on the Graph API
http://graph.facebook.com/[id]/picture
The following will give you different sizes
http://graph.facebook.com/[id]/picture?type=square
http://graph.facebook.com/[id]/picture?type=normal
http://graph.facebook.com/[id]/picture?type=large
So you can just put these URLs straight in an <img> tag
EG: <img src="http://graph.facebook.com/4/picture?type=square" />
See:
http://developers.facebook.com/docs/reference/api/#pictures
These are in the public domain, so there is no need for any authentication.

Get the profile picture with the Facebook C# SDK

I would like to get the profile picture. Can I do that with the Facebook SDK, and how?
When I use the Api.get option I get a jsonreader exception.
You can render the photo by just doing:
<img src="https://graph.facebook.com/**id**/picture"/>
in your page (obviously changing the id to the id of the user).
You don't have to retrieve it using the API, but you do have to retrieve the id.
You can also get pictures by their id using /photoid like so /98423808305
You can find more information here - http://developers.facebook.com/docs/graph-api

How to obtain this Facebook user id for the like button?

Referring to the Open Graph protocol, I must implement this strange tag to my website in order to add a like-button for it.
<meta property="fb:admins" content="USER_ID"/>
USER_ID is supposed to be replaced by my actual user ID at Facebook. How do I safely obtain the correct user ID?
This user id can be found a few ways:
1) Go to http://graph.facebook.com/you_user_name and you will see JSON data with the id property.
2) Or go to your profile page and you will see a url like this http://www.facebook.com/profile.php?id=12345656. The number after id= is your user id.
You can get a Facebook ID by doing this:
http://www.ehow.com/how_5753004_facebook-id.html
Basically, go to your photos and click on one. It will be in the URL bar under fbid.
If you log onto facebook you will see uid=USER_ID in the URL for home, profile etc.

FBConnect on iPhone. question about the profile image

Im developoing an app for the iPhone where users can chat using their facebook account info.
in this case: the facebook username & profile image. my question is How can I share the users profile picture in the chat box so that people can see each others avatars?
the pictures must be online somewhere? how to get to that url?
I should do somthing like this when the send button is tapped:
get the username, get the msg, get the the avatar url.
send the info to the chat server.
alt text http://img98.imageshack.us/img98/5103/screenshotrci.png
first get the album name by using FBconnect.photos.getAlbum and pass UID. it will return an array with all album info .then find the album name " profile pictures" and their album id.
after that use this album id to get the profile photo .
using this api FBConnect.photos.get and pass album id as params
this might be a little late, but all you need to do is put "pic_square" (a 50x50 image) into the fql query that you use for getting the name
NSString* fql = [NSString stringWithFormat:#"select uid, name, pic_square from user where uid == %lld", self.usersession.uid];
and that's it, it'll return a string with the URL of the image you want.