Reputation: 5069
I want to upload picture to timeline of user or page. I am able to upload picture to users wall but it has created new album with my application name. But i want to upload picture to timeline album of user.
I have uploaded picture using bellow code
var result = client.Post("/"+ id +"/photos", postparameters);
Upvotes: 0
Views: 1403
Reputation: 76
msm2020 solution do the trick but don't forget to add the albums permission: user_photos
Upvotes: 0
Reputation: 181
you can get album id dynamic :
dynamic albums = app.Get("me/albums");
string AlbumId="";
foreach (dynamic albumInfo in albums.data)
{
if(albumInfo.name == "Timeline Photos"){AlbumId=albumInfo.id; break;}
}
and the you can use AlbumId to post in the album .
Upvotes: 1
Reputation: 5069
I solved it.I just filtered id of the album where I wanted to post picture & passed it in place if "id" of above code.
var result = client.Post("/"+ album_id +"/photos", postparameters);
Upvotes: 1