Skip to content

Commit

Permalink
add RedirectURI param
Browse files Browse the repository at this point in the history
  • Loading branch information
JimLiu committed Jan 4, 2016
1 parent c1be24a commit 740a55f
Show file tree
Hide file tree
Showing 34 changed files with 82 additions and 289 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ WeiboSDK
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// ...
Weibo *weibo = [[Weibo alloc] initWithAppKey:@"您的AppKey" withAppSecret:@"您的AppSecret"];
Weibo *weibo = [[Weibo alloc] initWithAppKey:@"您的AppKey" withAppSecret:@"您的AppSecret" withRedirectURI:@"您的AppSecret RedirectURI"];
[Weibo setWeibo:weibo];
// ...
return YES;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef enum {
@property (nonatomic, copy) NSString *province; //用户所在省级
@property (nonatomic, copy) NSString *city; //用户所在城市
@property (nonatomic, copy) NSString *location; //用户所在地
@property (nonatomic, copy) NSString *description; //用户个人描述
@property (nonatomic, copy) NSString *userDescription; //用户个人描述
@property (nonatomic, copy) NSString *url; //用户博客地址
@property (nonatomic, copy) NSString *profileImageUrl; //用户头像地址
@property (nonatomic, copy) NSString *profileLargeImageUrl; //用户大头像地址
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ typedef enum {

@interface Weibo : NSObject

- (id)initWithAppKey:(NSString *)appKey withAppSecret:(NSString *)appSecret;
- (id)initWithAppKey:(NSString *)appKey withAppSecret:(NSString *)appSecret withRedirectURI: (NSString *)redirectURI;
+ (Weibo*)weibo;
// Used for Swift
+ (Weibo*)getWeibo;
+ (Weibo*)setWeibo:(Weibo*)weibo;


@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
@property (nonatomic, copy) NSString *redirectURI;

#pragma mark - Auth

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@interface WeiboAuthentication : NSObject

- (id)initWithAuthorizeURL:(NSString *)authorizeURL accessTokenURL:(NSString *)accessTokenURL
AppKey:(NSString *)appKey appSecret:(NSString *)appSecret;
appKey:(NSString *)appKey appSecret:(NSString *)appSecret redirectURI:(NSString *)redirectURI;

@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define kAppKey @"3326691039"
#define kAppSecret @"75dd27596a081b28651d214e246c1b15"
#define kRedirectURI @"http://api.weibo.com/oauth2/default.html"

#define kWeiboAuthorizeURL @"https://api.weibo.com/oauth2/authorize"
#define kWeiboAccessTokenURL @"https://api.weibo.com/oauth2/access_token"
Expand Down
24 changes: 0 additions & 24 deletions build/WeiboSDK.framework/Versions/A/DeprecatedHeaders/WeiboQuery.h

This file was deleted.

39 changes: 0 additions & 39 deletions build/WeiboSDK.framework/Versions/A/Headers/TimelineQuery.h

This file was deleted.

2 changes: 1 addition & 1 deletion build/WeiboSDK.framework/Versions/A/Headers/User.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef enum {
@property (nonatomic, copy) NSString *province; //用户所在省级
@property (nonatomic, copy) NSString *city; //用户所在城市
@property (nonatomic, copy) NSString *location; //用户所在地
@property (nonatomic, copy) NSString *description; //用户个人描述
@property (nonatomic, copy) NSString *userDescription; //用户个人描述
@property (nonatomic, copy) NSString *url; //用户博客地址
@property (nonatomic, copy) NSString *profileImageUrl; //用户头像地址
@property (nonatomic, copy) NSString *profileLargeImageUrl; //用户大头像地址
Expand Down
5 changes: 4 additions & 1 deletion build/WeiboSDK.framework/Versions/A/Headers/Weibo.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ typedef enum {

@interface Weibo : NSObject

- (id)initWithAppKey:(NSString *)appKey withAppSecret:(NSString *)appSecret;
- (id)initWithAppKey:(NSString *)appKey withAppSecret:(NSString *)appSecret withRedirectURI: (NSString *)redirectURI;
+ (Weibo*)weibo;
// Used for Swift
+ (Weibo*)getWeibo;
+ (Weibo*)setWeibo:(Weibo*)weibo;


@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
@property (nonatomic, copy) NSString *redirectURI;

#pragma mark - Auth

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@interface WeiboAuthentication : NSObject

- (id)initWithAuthorizeURL:(NSString *)authorizeURL accessTokenURL:(NSString *)accessTokenURL
AppKey:(NSString *)appKey appSecret:(NSString *)appSecret;
appKey:(NSString *)appKey appSecret:(NSString *)appSecret redirectURI:(NSString *)redirectURI;

@property (nonatomic, copy) NSString *appKey;
@property (nonatomic, copy) NSString *appSecret;
Expand Down
1 change: 1 addition & 0 deletions build/WeiboSDK.framework/Versions/A/Headers/WeiboConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#define kAppKey @"3326691039"
#define kAppSecret @"75dd27596a081b28651d214e246c1b15"
#define kRedirectURI @"http://api.weibo.com/oauth2/default.html"

#define kWeiboAuthorizeURL @"https://api.weibo.com/oauth2/authorize"
#define kWeiboAccessTokenURL @"https://api.weibo.com/oauth2/access_token"
Expand Down
24 changes: 0 additions & 24 deletions build/WeiboSDK.framework/Versions/A/Headers/WeiboQuery.h

This file was deleted.

Binary file modified build/WeiboSDK.framework/Versions/A/WeiboSDK
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
1510082917AEACA9006F9275 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0460;
LastUpgradeCheck = 0720;
ORGANIZATIONNAME = openlab;
};
buildConfigurationList = 1510082C17AEACA9006F9275 /* Build configuration list for PBXProject "HelloWeiboSample" */;
Expand Down Expand Up @@ -424,6 +424,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
Expand Down Expand Up @@ -479,6 +480,7 @@
GCC_PREFIX_HEADER = "HelloWeiboSample/HelloWeiboSample-Prefix.pch";
INFOPLIST_FILE = "HelloWeiboSample/HelloWeiboSample-Info.plist";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.openlab.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand All @@ -495,6 +497,7 @@
GCC_PREFIX_HEADER = "HelloWeiboSample/HelloWeiboSample-Prefix.pch";
INFOPLIST_FILE = "HelloWeiboSample/HelloWeiboSample-Info.plist";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.openlab.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
Expand Down
2 changes: 1 addition & 1 deletion samples/HelloWeiboSample/HelloWeiboSample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ @implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
Weibo *weibo = [[Weibo alloc] initWithAppKey:@"3326691039" withAppSecret:@"75dd27596a081b28651d214e246c1b15"];
Weibo *weibo = [[Weibo alloc] initWithAppKey:@"3326691039" withAppSecret:@"75dd27596a081b28651d214e246c1b15" withRedirectURI:@"http://api.weibo.com/oauth2/default.html"];
[Weibo setWeibo:weibo];
// Override point for customization after application launch.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.openlab.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down Expand Up @@ -49,6 +49,11 @@
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="3084" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="si7-Lv-qIu">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="si7-Lv-qIu">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="2083"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
</dependencies>
<scenes>
<!--View Controller - Home-->
<!--Home-->
<scene sceneID="ASP-y6-lPn">
<objects>
<tableViewController id="o4H-oO-zWY" customClass="ViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="Rvf-Cf-d73">
<rect key="frame" x="0.0" y="64" width="320" height="504"/>
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="Rvf-Cf-d73">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" id="X9V-w1-PEw">
<rect key="frame" x="0.0" y="22" width="320" height="44"/>
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="X9V-w1-PEw" id="VbE-CE-ASD">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
</tableView>
Expand All @@ -46,9 +46,4 @@
<point key="canvasLocation" x="-489" y="30"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
</document>
Loading

0 comments on commit 740a55f

Please sign in to comment.