+ Start a Discussion
Matt HimeMatt Hime 

Chatter API - Updating a users photo

Hi,

I wrote a piece of code to update the chatter photo for a user using the chatter API.  It's been working successfully,  however,  now it has stopped working.

The code looks like this:
Document content = [select Body from Document where id ='***known id***'];

ConnectApi.Photo photo = ConnectApi.ChatterUsers.setPhoto(null, UserInfo.getUserId(),  new ConnectApi.BinaryInput(content.Body,'image/jpg','userImage.jpg'));
I don't think that there's anything wrong with the code.  I have noticed that I cannot even update the picture from my chatter page anymore.  So,  is there some sort of limit that I have broken?
Best Answer chosen by Matt Hime

All Answers

NagaNaga (Salesforce Developers) 
Hi Matt,

I see nothing wrong with the code that you are using.What error are you getting when you are trying to do this.

But however, please try the link below

http://www.salesforce.com/us/developer/docs/chatterapi/

Best Regards
Naga kiran
Matt HimeMatt Hime
Well,  that's the thing,  I'm not seeing any error at all.  Since I can't even change my chatter photo therough the standard chatter profile page,  I think that there must be a bigger issue.
Abers55Abers55
This was selected as the best answer