0
我正嘗試從我的Android應用發送直接消息。爲此,我使用了Google,並從鏈接中找到以下解決方案。在Twitter4j中,我找到了代碼片段。我在我的Android應用程序嘗試同樣的也有,但是得到了這個問題:Android Twitter sendDirectMessages無法正常工作
http://twitter4j.org/en/code-examples.html
// The factory instance is re-useable and thread safe.
Twitter sender = new TwitterFactory().getInstance();
DirectMessage message = sender.sendDirectMessage(recipientId, message);
System.out.println("Sent: " message.getText() + " to @" + message.getRecipientScreenName());
Issue :
**10-10 20:04:26.440: E/AndroidRuntime(6935): java.lang.IllegalStateException: Authentication credentials are missing. See http://twitter4j.org/configuration.html for the detail.**
請幫我走出這個問題。
我在嘗試將直接消息發送給我的追隨者時遇到以下異常。 10-11 11:21:45.930:W/System.err(11946):403:該請求被理解,但它已被拒絕。隨附的錯誤信息將解釋原因。由於更新限制,請求被拒絕時使用此代碼(https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following)。 10-11 11:21:45.930:W/System.err(11946):錯誤 - 您不能將郵件發送給沒有關注您的用戶。 – RAJESH