0
我們必須更新Twitter_oauth寶石到v.0.4.9以支持Twitter的新1.1 API。但是,收藏帖子和下列用戶不起作用。我得到試圖按照用戶或喜歡的帖子如下當了一回錯誤:錯誤代碼34 twitter_oauth 4.9寶石
{"errors"=>[{"message"=>"Sorry, that page does not exist", "code"=>34}]}
我有以下內容的api_client型號:
def follow(id)
client.friend(id)
end
我的控制器代碼:
def update
status = if params[:follow]
client.follow(params[:id])
elsif params[:follow] == 'false'
client.follow(params[:id])
end
respond_to do |format|
format.json do
if status['screen_name'] == params[:screen_name]
success = true
notice = if params[:follow] == 'true'
"You are now following #{status['screen_name']}"
else
"You are no longer following #{status['screen_name']}"
end
else
success = false
notice = 'Something went wrong. Try again in a couple of seconds.'
end
render :json => {:success => success, :message => notice}.to_json
end
end
end
有沒有其他人遇到過這個問題,或者可以幫我弄清楚發生了什麼?