Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

I'm looking for a user.setImage call or something to that effect on the Facebook API but I can't see anything to achieve this: specifically to overwrite a user's profile image (not just post an image on their wall).

I can't see anything in the docs. Do you know if this is possible and if so any docs on implementing it?

like image 254
thruflo Avatar asked Oct 30 '09 09:10

thruflo


People also ask

What does Facebook API give?

What is the Facebook API? The Facebook Graph API is an HTTP-based API that allows developers to extract data and functionality from the Facebook platform. Applications can use this API to programmatically query data, post in pages and groups, and manage ads, among other tasks.


2 Answers

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.

like image 62
Hannes Avatar answered Sep 18 '22 17:09

Hannes


No, you cannot.

From the photos.Upload documentation:

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

like image 45
Portman Avatar answered Sep 20 '22 17:09

Portman