2012-02-21 13 views
1

私のアプリで私たちのローカルサーバーにアップロードされているいくつかの写真が表示されています。ユーザーが写真を好きなら、彼はそれをTwitterに、電子メールで共有することができます。AndroidアプリからTwitterに写真を共有する

に保存されている場合、画像をemailに共有する方法はありますか。続き

は私のTwitterのコードあなたがtwitter4jを使用することができますし、写真やテキストを共有することができ、それが

+0

あなたは... @siva kをそれを考え出した場合 –

+0

申し訳ありません私はくぼみTwitterだけでテキストのみを共有し、このための解決策を得る解決策を共有してください.... –

答えて

0

Twitterの壁に共有することができる方法

Intent i = new Intent(getApplicationContext(), PrepareRequestTokenActivity.class); 
i.putExtra("imagetitle", imgtit); 
i.putExtra("image_path", get_intent_path); 
startActivity(i); 

です。サンプルコードを以下に示します。

public void Share_Pic_Text_Titter(File image_path, String message, 
    Twitter twitter) throws Exception { 
    try { 
     StatusUpdate st = new StatusUpdate(message); 
     st.setMedia(image_path); 
     twitter.updateStatus(st); 

    } catch (TwitterException e) { 
     Log.d("Error==>", "Pic Upload error" + e.getErrorMessage()); 
     throw e; 
    } 
} 
関連する問題