如何通过Windows Phone应用程序在Facebook上共享图片? [英] How to share Picture on Facebook from my Windows Phone app?

查看:77
本文介绍了如何通过Windows Phone应用程序在Facebook上共享图片?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将图像保存在保存的图片"相册中.我想在Facebook上分享这张图片.我该怎么办?

解决方案

我假设您不想安装用于高级功能等的Facebook SDK,并且您正在谈论与内置共享任务共享图像. /p>

由于您没有提供完成操作的任何代码,因此,您可以获取保存在已保存的图片"相册中的最后一张照片:

MediaLibrary library = new MediaLibrary();
var picture = library.SavedPictures[library.SavedPictures.Count - 1];

现在在图片中,您拥有的是已保存的图片"中的最后一张图像.要启动将显示所有可以共享图像的应用程序的共享媒体任务,请编写以下内容:

ShareMediaTask shareMediaTask = new ShareMediaTask();
shareMediaTask.FilePath = picture.GetPath();
shareMediaTask.Show();

I've saved an image in "Saved Pictures" Album. I would like to share this image on Facebook. How do I do that?

解决方案

I assume that you do not want to install the Facebook SDK for advanced features etc. and you are talking about sharing the image with the built in share task.

Since you haven't provided any code of what you've done this is how you can get the last picture that is saved in the Saved Pictures album:

MediaLibrary library = new MediaLibrary();
var picture = library.SavedPictures[library.SavedPictures.Count - 1];

Now in picture you have the last image that is in Saved Pictures. To launch a share media task that will display all the apps that can share the image you write the following:

ShareMediaTask shareMediaTask = new ShareMediaTask();
shareMediaTask.FilePath = picture.GetPath();
shareMediaTask.Show();

这篇关于如何通过Windows Phone应用程序在Facebook上共享图片?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆