You need to sign in to do that
Don't have an account?
Amit Visapurkar
ConnectApi.ChatterUsers.setPhoto(null,userinfo.getUserId(),b)
When I run the code get the following error.
Error: Compile Error: Method was removed after version 34.0: setPhoto
What is the new method?
Error: Compile Error: Method was removed after version 34.0: setPhoto
What is the new method?
you are correct this methid is available for the version 28-34
there is a new api method available is: setPhoto(communityId, userId, fileUpload)
If this doesn't work you may have to swich back to version 34 of apex and visualforce page and use the same method.
Thanks
Jeet
Check below code, and see if you are missing something:
Please use use "ConnectApi.UserProfiles" in place of "ConnectApi.ChatterUsers" like below:
ConnectApi.UserProfiles.setPhotoWithAttributes(communityId, userId, photo)
Please let me know if the helps.
As a common practice, if your question is answered, please choose 1 best answer.Additionaly you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Arun