2010-02-09 45 views
1

在Android應用程序上工作,想要爲其添加推特功能,就像在每次通勤之後將twit發送到用戶帳戶一樣。是否可以將twitter添加到android應用程序中而不要求用戶的twitter帳戶詳細信息(user_name和password)。我認爲使用Twidroid是可能的,但我不知道如何繼續。請引導。爲Android應用程序添加推特功能

感謝ü, 問候 謝赫

回答

2

如果你想使用他們的API,你會以某種方式必須提供你的Twitter帳戶的用戶名和密碼發送更新到Twitter。當然,您可以輸入一次並將它們存儲在您的偏好中。對於某些代碼,請參閱Twitter客戶端的this example

1

的代碼背馱式的Twidroid應用程序發送推文是在他們的網站:

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)); 

請注意,這需要用戶有Twidroid預裝。

相關問題