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

	args := r.URL.Query()
	id := args[common.ID][0] //Tweet id

	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)

	go tweet.TweetDetail(cxt, session, access_token, i, chTweet)
	pTweet := <-chTweet

	s := fmt.Sprintf(`{"status":%d, "tweet":%s}`, common.STATUS_OK, pTweet.String())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
//Get detail of a single tweet.
Get detail of a single tweet.
// Get detail of a single tweet .
func handleTweetDetail(w http.ResponseWriter, r *http.Request) {
	cxt := appengine.NewContext(r)
	chTweet := make(chan *tweet.Tweet)
	defer func() {
		if err := recover(); err != nil {
			cxt.Errorf("handleTweetDetail: %v", err)
			fmt.Fprintf(w, `{"status":%d}`, common.STATUS_ERR)
		}
	}()
	args := r.URL.Query()
	id := args[common.ID][0] 
	cookies := r.Cookies()           
	session := cookies[0].Value      
	access_token := cookies[1].Value 
	i, _ := strconv.Atoi(id)
	go tweet.TweetDetail(cxt, session, access_token, i, chTweet)
	pTweet := <-chTweet
	s := fmt.Sprintf(`{"status":%d, "tweet":%s}`, common.STATUS_OK, pTweet.String())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
func handleTweetDetail ( w http . ResponseWriter , r * http . Request ) { cxt := appengine . NewContext ( r ) chTweet := make ( chan * tweet . Tweet ) 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 ] cookies := r . Cookies ( ) session := cookies [ 0 ] . Value access_token := cookies [ 1 ] . Value i , _ := strconv . Atoi ( id ) go tweet . TweetDetail ( cxt , session , access_token , i , chTweet ) pTweet := <- chTweet s := fmt . Sprintf ( `{"status":%d, "tweet":%s}` , common . STATUS_OK , pTweet . String ( ) ) w . Header ( ) . Set ( " " , common . API_RESTYPE ) fmt . Fprintf ( w , s ) }
Get detail of a single tweet.
Get detail of a single tweet .
//Tweet id //Session in cookies passt //Get user-session //Get user-token