I am creating Windows Phone 7 application. So far I've got login to Facebook account and post text to my wall. I want now upload image to my feed/album.
How can I browse for image on the phone and then selected image upload to Facebook feed/album?
Regars
try this code somewhere in your application:
public void ShowPhotoChooser()
{
PhotoChooserTask photoChooserTask = new PhotoChooserTask();
photoChooserTask.Completed += new EventHandler<PhotoResult>(photoChooserTask_Completed);
photoChooserTask.Show();
}
void photoChooserTask_Completed(object sender, PhotoResult e)
{
if (e.TaskResult == TaskResult.OK)
{
System.Windows.Media.Imaging.BitmapImage bmp =
new System.Windows.Media.Imaging.BitmapImage();
bmp.SetSource(e.ChosenPhoto);
}
}
http://msdn.microsoft.com/en-us/library/ff769543(v=vs.92).aspx#BKMK_Photo
Should contain all you need to know.
Cheers!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.