示例#1
0
// Post actions
func LikePosts(s *session.Session, id string) {
	v := url.Values{}

	response, err := s.Post("https://api.instagram.com/v1/media/"+id+"/likes", v)
	if err != nil {
		panic(err)
	}
	s.Log(string(response.StatusCode))
}
示例#2
0
func FollowUser(s *session.Session, id string) {
	v := url.Values{}
	v.Set("action", "follow")

	response, err := s.Post("https://api.instagram.com/v1/users/"+strings.Split(id, "_")[1]+"/relationship", v)
	if err != nil {
		panic(err)
	}
	s.Log(string(response.StatusCode))
}