블로그 이미지
elvaDocu

공지사항

최근에 올라온 글

최근에 달린 댓글

글 보관함

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

최근에 변경된 트위터사의 인증 방법 변경으로 아래의 방법으로 코딩하면 

오류가 발생하더군여~ 그냥 참고만 하시는게 좋을듯-_- // 2010. 10. 8 작성


리스트의 설정없이 간단하게 자신의 타임라인의 글을 가져 오는 예제입니다
좀 더 잘 활용하려면 가공이 필요함


import java.util.List;
import java.lang.System;
import twitter4j.Status; 
import twitter4j.Twitter;
import twitter4j.TwitterException;

class test_twitter_Mytimeline {
    String senderID = "아이디입력";
    String senderPassword = "비밀번호입력"; 
    Twitter twitter = new Twitter(senderID,senderPassword);

public test_twitter_Mytimeline() {
 List<Status> = null;     
      try {
        statuses = twitter.getFriendsTimeline();
       }catch (TwitterException e){
        e.printStackTrace();
       }

      System.out.println("Showing friends timeline.");
  
      for (Status status : statuses) {
         System.out.println(status.getUser().getName()+" : "+ status.getText());
     }

  }
} 


class list_twit {
	public static void main(String args[]){
		test_twitter_Mytimeline ttm = new test_twitter_Mytimeline();
	}
}