How to Share My News on Facebook on Windows Phone 8

走远了吗. 提交于 2019-12-24 12:09:39

问题


I am on windows phone project. This project includes the latest news from various categories.

I'm done with getting news from my web service on my device. But i need to share these news on facebook, twitter etc..

How can i do that ?

I checked https://developers.facebook.com/ but couldn't find the idea or i found, here http://facebooksdk.net/docs/phone/.

Is there any idea ? Help me about this please. I need to put a button at the end of my news and i need to share them on social platforms.

Waiting your answers with four-eye.

Thank you very much.


回答1:


Use the ShareStatusTask

private void Button_Click(object sender, RoutedEventArgs e)
{
   //theMessageStatus is the message you want to post to FB/Twitter
   ShareNewsArticle(theMessageStatus);
}

private void ShareNewsArticle(string message)
{
   ShareStatusTask sst = new ShareStatusTask();
   sst.Status = message;
   sst.Show();
}

This will let the user choose what social network to update (e.g. FB, Twitter etc..)



来源:https://stackoverflow.com/questions/17973578/how-to-share-my-news-on-facebook-on-windows-phone-8

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