Can I set a users profile image using the Facebook API?

耗尽温柔 提交于 2019-11-26 22:11:27
Hannes

You can redirect the user to the following link where [PID] stands for the id of the desired picture:

http://www.facebook.com/photo.php?fbid=[PID]&makeprofile=1

On this page the user will see the picture and immediately be prompted with a dialog if he wants to set it as his profile picture.

Portman

No, you cannot.

From the photos.Upload documentation:

However, you cannot upload to a user's profile picture album.

fredrik

Checkout my answer in this thread: how to set a facebook profile picture using the graph api

You can't set the profile picture, but you can upload it to an album, and then send the user to the "make profile picture"-page for that picture.

Christophe Hartwig

There must be a hidden API because the iphone facebook app does it... Maybe you can discover how by setting a proxy between an iphone and Facebook and decipher it... or the API may be restricted to only Facebook's own apps...

Well it seems there's a way now with a new framework extension: https://developers.facebook.com/docs/profile-expression-kit/ios#uploading

You can upload an image, but you CAN'T set it as one's profile picture. So, the user has to set it as their profile picture themselves. You have to redirect them to the permalink of the uploaded image.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!