Does anyone know a simple method for posting a tweet from within a WP7 app?

十年热恋 提交于 2019-12-11 10:05:08

问题


Im trying create a windows phone 7 application that allows the user to click a button and login to their twitter account and then using a text box send a basic tweet to their twitter account. Is there a simple method of doing this? Ive found a number of examples very hard to follow.

Thanks in Advance


回答1:


Providing you have Twitter configured on the device, use the ShareStatusTask

var tsk = new Microsoft.Phone.Tasks.ShareStatusTask();
tsk.Status = "Hello world!";
tsk.Show();

This also allows the user to post to Facebook / Windows Live / other social networks. If you want to limit it to Twitter, you'll need to roll your own - possibly by launching a web browser to https://twitter.com/intent/tweet?source=webclient&text=your+encoded+message+text



来源:https://stackoverflow.com/questions/9193868/does-anyone-know-a-simple-method-for-posting-a-tweet-from-within-a-wp7-app

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