func handleTweetCommentList(w http.ResponseWriter, r *http.Request) {
	cxt := appengine.NewContext(r)
	chCommentList := make(chan *comment.CommentList)
	defer func() {
		if err := recover(); err != nil {
			cxt.Errorf("handleTweetCommentList: %v", err)
			fmt.Fprintf(w, `{"status":%d}`, common.STATUS_ERR)
		}
	}()

	args := r.URL.Query()
	id := args[common.ID][0]     //Which tweet item
	page := args[common.PAGE][0] //Which page

	cookies := r.Cookies()           //Session in cookies passt
	session := cookies[0].Value      //Get user-session
	access_token := cookies[1].Value //Get user-token

	i, _ := strconv.Atoi(id)
	pg, _ := strconv.Atoi(page)

	go comment.TweetCommentList(cxt, session, access_token, i, pg, chCommentList)
	pCommentList := <-chCommentList
	s := fmt.Sprintf(`{"status":%d, "comments":%s}`, common.STATUS_OK, pCommentList.StringCommentArray())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
//Get all comments of a tweet.
Get all comments of a tweet.
// Get all comments of a tweet .
func handleTweetCommentList(w http.ResponseWriter, r *http.Request) {
	cxt := appengine.NewContext(r)
	chCommentList := make(chan *comment.CommentList)
	defer func() {
		if err := recover(); err != nil {
			cxt.Errorf("handleTweetCommentList: %v", err)
			fmt.Fprintf(w, `{"status":%d}`, common.STATUS_ERR)
		}
	}()
	args := r.URL.Query()
	id := args[common.ID][0]     
	page := args[common.PAGE][0] 
	cookies := r.Cookies()           
	session := cookies[0].Value      
	access_token := cookies[1].Value 
	i, _ := strconv.Atoi(id)
	pg, _ := strconv.Atoi(page)
	go comment.TweetCommentList(cxt, session, access_token, i, pg, chCommentList)
	pCommentList := <-chCommentList
	s := fmt.Sprintf(`{"status":%d, "comments":%s}`, common.STATUS_OK, pCommentList.StringCommentArray())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
func handleTweetCommentList ( w http . ResponseWriter , r * http . Request ) { cxt := appengine . NewContext ( r ) chCommentList := make ( chan * comment . CommentList ) defer func ( ) { if err := recover ( ) ; err != nil { cxt . Errorf ( " " , err ) fmt . Fprintf ( w , `{"status":%d}` , common . STATUS_ERR ) } } ( ) args := r . URL . Query ( ) id := args [ common . ID ] [ 0 ] page := args [ common . PAGE ] [ 0 ] cookies := r . Cookies ( ) session := cookies [ 0 ] . Value access_token := cookies [ 1 ] . Value i , _ := strconv . Atoi ( id ) pg , _ := strconv . Atoi ( page ) go comment . TweetCommentList ( cxt , session , access_token , i , pg , chCommentList ) pCommentList := <- chCommentList s := fmt . Sprintf ( `{"status":%d, "comments":%s}` , common . STATUS_OK , pCommentList . StringCommentArray ( ) ) w . Header ( ) . Set ( " " , common . API_RESTYPE ) fmt . Fprintf ( w , s ) }
Get all comments of a tweet.
Get all comments of a tweet .
//Which tweet item //Which page //Session in cookies passt //Get user-session //Get user-token