开发者

Add twitter feature for android application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
开发者_开发问答

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed last year.

Improve this question

Working on android application, wanna add twitter feature to it , like after every commute send the twit to the user account . Is it possible to add twitter into the android app without asking for user's twitter account details (user_name and password). I think using Twidroid it is possible but i dont know how to proceed .Please guide .

thank u, regards Sheik


If you want to send updates to Twitter using their API you will somehow have to provide the username and password for your Twitter account. Of course you can enter these once and store them in your preferences. For some code see this example of a Twitter client.


The code to piggy-back the Twidroid application to sent tweets is at their website:

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra(Intent.EXTRA_TEXT, "This is a sample message"); 
sendIntent.setType("application/twitter");      
startActivity(Intent.createChooser(sendIntent, null)); 

Please note that this requires users to have Twidroid preinstalled.


I'd recommend using the oauth-signpost library and the example source code here. Worked great for me, and you're not storing usernames and passwords.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜