Can anyone tell me how to get the chatter profile pic using connect api in visualforce page? I need a sample code for this...Because I am new to connect api.
Thanks in advance
Karthick
You dont need ConnectApi to get the photoURL
You can query User Object to get PhotoURL of any User ,The User object has SmallPhotoURL and LargePhotoURL as fields .This holds the profile photo of chatter
Edit
Blob image = attachment.body;//its the blob of your attachment body or blob data of your image
//Call the Connect API to Change the Photo
if(!Test.isRunningTest()){//Since for this we dont have any way of testing this we skip using isTesting Flag
ConnectApi.BinaryInput b=new ConnectApi.BinaryInput(image,contenttype,'myimage');
ConnectApi.ChatterUsers.setPhoto(null,userinfo.getUserId(),b);
}
You will need first blob data of your image and then construct connectapi.binary Input from that and then use setphoto to change photo of user.Set photo pass userId and binary data
Dont need the api u can do it in profiles only and every thing which u edit for home page go to setup customize their