Odnoklassniki API找工作液取的朋友計數使用Ruby的 Odnoklassniki API試圖用狐猴和school_friend寶石沒有成功取的朋友計數使用Ruby的
require 'school_friend'
SchoolFriend.application_id = '193320768'
SchoolFriend.application_key = 'CBALsdsASDBA'
SchoolFriend.secret_key = 'A3AA9342CR47DA4BC315'
SchoolFriend.api_server = 'http://api.odnoklassniki.ru'
puts SchoolFriend.users.is_app_user(:uid => '571931088692')
{"error_code"=>100, "error_data"=>nil, "error_msg"=>"PARAM : Missed required parameter: access_token"}
即使我指定在文檔中提到的access_token如下所示:
session = SchoolFriend.session(:access_token => 'token_from_oauth2_client')
session.friends.get
{"error_code"=>100, "error_data"=>nil, "error_msg"=>"PARAM : Missed required parameter: access_token"}
我仍然得到相同的錯誤
你更改調試級別? 'SchoolFriend.logger.level = Logger :: DEBUG' – phoet
[19] pry(main)> puts session.friends.get D,[2013-09-30T21:39:35.247478#1466] DEBUG - :API請求: http://api.odnoklassniki.ru/api/friends/get?application_key=CBAdsdsdABABABA&sig=c7aef83esdsdsdsds05a3ffb010 {「error_code」=> 100,「error_data」=> nil,「error_msg」=>「PARAM:錯過必需參數:access_token 「} – Danil