This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Attention: the below methods are actions extracted from my controllers in a Rails App, if you need to use these codes outside | |
# a Rails project, rememeber to replace some Rails-specified methods, such as, Hash#to_param. | |
# STEP 1: start to request an authorization | |
def request_authorize | |
session[:security_state] = 'I am from Martin site' | |
authorize_url = "https://api.weibo.com/oauth2/authorize" | |
params = { | |
client_id: "663911642", # Required: Your assigned App Key |