我正在尝试使用Ruby
从API中获取Twitter收藏的基本列表,但我一直对这个错误表示不满。
baseurl = "https://api.twitter.com"
path = "/1.1/favorites/list.json"
query = URI.encode_www_form(
"screen_name" => "twitterapi",
"count" => 10)
address = URI("#{baseurl}#{path}#{query}")
每次运行时我都会遇到undefined method encode_www_form for URI:Module (NoMethodError)
错误。
答案 0 :(得分:0)
使用:
URI.encode_www_form_component(yourStringToEncodeHere)