weibo2_plugins 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,15 +4,11 @@ require 'typhoeus'
|
|
4
4
|
|
5
5
|
module Weibo2Plugins
|
6
6
|
# Weibo2Plugins::Base.get_call_back_url('2154274819','74e4428b7ed95bf47317ee31075ea802',"http://www.tianji.com/api/users/weibo_callback")
|
7
|
-
class Base
|
8
|
-
def
|
7
|
+
class Base
|
8
|
+
def self.get_call_back_url weibo_key,weibo_secret,call_back_url
|
9
9
|
Weibo2::Config.api_key = weibo_key
|
10
10
|
Weibo2::Config.api_secret = weibo_secret
|
11
11
|
Weibo2::Config.redirect_uri = call_back_url
|
12
|
-
end
|
13
|
-
|
14
|
-
def self.get_call_back_url call_back_url
|
15
|
-
Base.new call_back_url
|
16
12
|
client = Weibo2::Client.new
|
17
13
|
client.auth_code.authorize_url(:response_type => "token")
|
18
14
|
end
|