Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added methods list friends and followers

  • Loading branch information...
commit 1892cdadccfcdeb91b3a76a786dafc28fb1dbae0 1 parent fcba84d
@lucascorrea authored
View
68 SCTwitter.xcodeproj/project.pbxproj
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
+ F9228E9D161E0A1C00D3ECC5 /* libxml2.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F9228E9C161E0A1B00D3ECC5 /* libxml2.dylib */; };
F99446EE14FEF6370017A5D8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F99446ED14FEF6370017A5D8 /* UIKit.framework */; };
F99446F014FEF6370017A5D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F99446EF14FEF6370017A5D8 /* Foundation.framework */; };
F99446F214FEF6370017A5D8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F99446F114FEF6370017A5D8 /* CoreGraphics.framework */; };
@@ -16,7 +17,6 @@
F994470114FEF6370017A5D8 /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F99446FF14FEF6370017A5D8 /* MainStoryboard.storyboard */; };
F994470414FEF6370017A5D8 /* SCTwitterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F994470314FEF6370017A5D8 /* SCTwitterViewController.m */; };
F994471014FEFB1B0017A5D8 /* SCTwitter.m in Sources */ = {isa = PBXBuildFile; fileRef = F994470F14FEFB1B0017A5D8 /* SCTwitter.m */; };
- F99447D614FEFD590017A5D8 /* libxml2.2.7.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F99447D514FEFD590017A5D8 /* libxml2.2.7.3.dylib */; };
F99448F5150119510017A5D8 /* icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F99448F4150119500017A5D8 /* icon.png */; };
F99448F71501195D0017A5D8 /* icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F99448F61501195B0017A5D8 /* icon@2x.png */; };
F9A4ACD01501474500D73407 /* backgroundButton.png in Resources */ = {isa = PBXBuildFile; fileRef = F9A4ACCF1501474500D73407 /* backgroundButton.png */; };
@@ -27,16 +27,6 @@
F9A4AD81150566C800D73407 /* libOAuth.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F9A4AD47150566C800D73407 /* libOAuth.a */; };
F9A4AD82150566C800D73407 /* MGTwitterEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD5A150566C800D73407 /* MGTwitterEngine.m */; };
F9A4AD83150566C800D73407 /* MGTwitterHTTPURLConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD5E150566C800D73407 /* MGTwitterHTTPURLConnection.m */; };
- F9A4AD84150566C800D73407 /* MGTwitterLibXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD60150566C800D73407 /* MGTwitterLibXMLParser.m */; };
- F9A4AD85150566C800D73407 /* MGTwitterMessagesLibXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD62150566C800D73407 /* MGTwitterMessagesLibXMLParser.m */; };
- F9A4AD86150566C800D73407 /* MGTwitterMessagesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD64150566C800D73407 /* MGTwitterMessagesParser.m */; };
- F9A4AD87150566C800D73407 /* MGTwitterMiscLibXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD66150566C800D73407 /* MGTwitterMiscLibXMLParser.m */; };
- F9A4AD88150566C800D73407 /* MGTwitterMiscParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD68150566C800D73407 /* MGTwitterMiscParser.m */; };
- F9A4AD89150566C800D73407 /* MGTwitterStatusesLibXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD6C150566C800D73407 /* MGTwitterStatusesLibXMLParser.m */; };
- F9A4AD8A150566C800D73407 /* MGTwitterStatusesParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD6E150566C800D73407 /* MGTwitterStatusesParser.m */; };
- F9A4AD8B150566C800D73407 /* MGTwitterUsersLibXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD70150566C800D73407 /* MGTwitterUsersLibXMLParser.m */; };
- F9A4AD8C150566C800D73407 /* MGTwitterUsersParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD72150566C800D73407 /* MGTwitterUsersParser.m */; };
- F9A4AD8D150566C800D73407 /* MGTwitterXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD74150566C800D73407 /* MGTwitterXMLParser.m */; };
F9A4AD8E150566C800D73407 /* NSData+Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD76150566C800D73407 /* NSData+Base64.m */; };
F9A4AD8F150566C800D73407 /* NSString+UUID.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD78150566C800D73407 /* NSString+UUID.m */; };
F9A4AD90150566C800D73407 /* SA_OAuthTwitterController.m in Sources */ = {isa = PBXBuildFile; fileRef = F9A4AD7B150566C800D73407 /* SA_OAuthTwitterController.m */; };
@@ -45,6 +35,7 @@
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ F9228E9C161E0A1B00D3ECC5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
F99446E914FEF6370017A5D8 /* SCTwitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SCTwitter.app; sourceTree = BUILT_PRODUCTS_DIR; };
F99446ED14FEF6370017A5D8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
F99446EF14FEF6370017A5D8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -60,7 +51,6 @@
F994470314FEF6370017A5D8 /* SCTwitterViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SCTwitterViewController.m; sourceTree = "<group>"; };
F994470E14FEFB1B0017A5D8 /* SCTwitter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCTwitter.h; path = SCTwitter/SCTwitter.h; sourceTree = "<group>"; };
F994470F14FEFB1B0017A5D8 /* SCTwitter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SCTwitter.m; path = SCTwitter/SCTwitter.m; sourceTree = "<group>"; };
- F99447D514FEFD590017A5D8 /* libxml2.2.7.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.2.7.3.dylib; path = usr/lib/libxml2.2.7.3.dylib; sourceTree = SDKROOT; };
F99448F4150119500017A5D8 /* icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = icon.png; path = ../icon.png; sourceTree = "<group>"; };
F99448F61501195B0017A5D8 /* icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "icon@2x.png"; path = "../icon@2x.png"; sourceTree = "<group>"; };
F9A4ACCF1501474500D73407 /* backgroundButton.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = backgroundButton.png; path = Resources/images/backgroundButton.png; sourceTree = "<group>"; };
@@ -90,28 +80,8 @@
F9A4AD5C150566C800D73407 /* MGTwitterEngineGlobalHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterEngineGlobalHeader.h; sourceTree = "<group>"; };
F9A4AD5D150566C800D73407 /* MGTwitterHTTPURLConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterHTTPURLConnection.h; sourceTree = "<group>"; };
F9A4AD5E150566C800D73407 /* MGTwitterHTTPURLConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterHTTPURLConnection.m; sourceTree = "<group>"; };
- F9A4AD5F150566C800D73407 /* MGTwitterLibXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterLibXMLParser.h; sourceTree = "<group>"; };
- F9A4AD60150566C800D73407 /* MGTwitterLibXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterLibXMLParser.m; sourceTree = "<group>"; };
- F9A4AD61150566C800D73407 /* MGTwitterMessagesLibXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterMessagesLibXMLParser.h; sourceTree = "<group>"; };
- F9A4AD62150566C800D73407 /* MGTwitterMessagesLibXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterMessagesLibXMLParser.m; sourceTree = "<group>"; };
- F9A4AD63150566C800D73407 /* MGTwitterMessagesParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterMessagesParser.h; sourceTree = "<group>"; };
- F9A4AD64150566C800D73407 /* MGTwitterMessagesParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterMessagesParser.m; sourceTree = "<group>"; };
- F9A4AD65150566C800D73407 /* MGTwitterMiscLibXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterMiscLibXMLParser.h; sourceTree = "<group>"; };
- F9A4AD66150566C800D73407 /* MGTwitterMiscLibXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterMiscLibXMLParser.m; sourceTree = "<group>"; };
- F9A4AD67150566C800D73407 /* MGTwitterMiscParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterMiscParser.h; sourceTree = "<group>"; };
- F9A4AD68150566C800D73407 /* MGTwitterMiscParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterMiscParser.m; sourceTree = "<group>"; };
F9A4AD69150566C800D73407 /* MGTwitterParserDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterParserDelegate.h; sourceTree = "<group>"; };
F9A4AD6A150566C800D73407 /* MGTwitterRequestTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterRequestTypes.h; sourceTree = "<group>"; };
- F9A4AD6B150566C800D73407 /* MGTwitterStatusesLibXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterStatusesLibXMLParser.h; sourceTree = "<group>"; };
- F9A4AD6C150566C800D73407 /* MGTwitterStatusesLibXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterStatusesLibXMLParser.m; sourceTree = "<group>"; };
- F9A4AD6D150566C800D73407 /* MGTwitterStatusesParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterStatusesParser.h; sourceTree = "<group>"; };
- F9A4AD6E150566C800D73407 /* MGTwitterStatusesParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterStatusesParser.m; sourceTree = "<group>"; };
- F9A4AD6F150566C800D73407 /* MGTwitterUsersLibXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterUsersLibXMLParser.h; sourceTree = "<group>"; };
- F9A4AD70150566C800D73407 /* MGTwitterUsersLibXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterUsersLibXMLParser.m; sourceTree = "<group>"; };
- F9A4AD71150566C800D73407 /* MGTwitterUsersParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterUsersParser.h; sourceTree = "<group>"; };
- F9A4AD72150566C800D73407 /* MGTwitterUsersParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterUsersParser.m; sourceTree = "<group>"; };
- F9A4AD73150566C800D73407 /* MGTwitterXMLParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MGTwitterXMLParser.h; sourceTree = "<group>"; };
- F9A4AD74150566C800D73407 /* MGTwitterXMLParser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MGTwitterXMLParser.m; sourceTree = "<group>"; };
F9A4AD75150566C800D73407 /* NSData+Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+Base64.h"; sourceTree = "<group>"; };
F9A4AD76150566C800D73407 /* NSData+Base64.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+Base64.m"; sourceTree = "<group>"; };
F9A4AD77150566C800D73407 /* NSString+UUID.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSString+UUID.h"; sourceTree = "<group>"; };
@@ -128,7 +98,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- F99447D614FEFD590017A5D8 /* libxml2.2.7.3.dylib in Frameworks */,
+ F9228E9D161E0A1C00D3ECC5 /* libxml2.dylib in Frameworks */,
F99446EE14FEF6370017A5D8 /* UIKit.framework in Frameworks */,
F99446F014FEF6370017A5D8 /* Foundation.framework in Frameworks */,
F99446F214FEF6370017A5D8 /* CoreGraphics.framework in Frameworks */,
@@ -159,7 +129,7 @@
F99446EC14FEF6370017A5D8 /* Frameworks */ = {
isa = PBXGroup;
children = (
- F99447D514FEFD590017A5D8 /* libxml2.2.7.3.dylib */,
+ F9228E9C161E0A1B00D3ECC5 /* libxml2.dylib */,
F99446ED14FEF6370017A5D8 /* UIKit.framework */,
F99446EF14FEF6370017A5D8 /* Foundation.framework */,
F99446F114FEF6370017A5D8 /* CoreGraphics.framework */,
@@ -293,28 +263,8 @@
F9A4AD5C150566C800D73407 /* MGTwitterEngineGlobalHeader.h */,
F9A4AD5D150566C800D73407 /* MGTwitterHTTPURLConnection.h */,
F9A4AD5E150566C800D73407 /* MGTwitterHTTPURLConnection.m */,
- F9A4AD5F150566C800D73407 /* MGTwitterLibXMLParser.h */,
- F9A4AD60150566C800D73407 /* MGTwitterLibXMLParser.m */,
- F9A4AD61150566C800D73407 /* MGTwitterMessagesLibXMLParser.h */,
- F9A4AD62150566C800D73407 /* MGTwitterMessagesLibXMLParser.m */,
- F9A4AD63150566C800D73407 /* MGTwitterMessagesParser.h */,
- F9A4AD64150566C800D73407 /* MGTwitterMessagesParser.m */,
- F9A4AD65150566C800D73407 /* MGTwitterMiscLibXMLParser.h */,
- F9A4AD66150566C800D73407 /* MGTwitterMiscLibXMLParser.m */,
- F9A4AD67150566C800D73407 /* MGTwitterMiscParser.h */,
- F9A4AD68150566C800D73407 /* MGTwitterMiscParser.m */,
F9A4AD69150566C800D73407 /* MGTwitterParserDelegate.h */,
F9A4AD6A150566C800D73407 /* MGTwitterRequestTypes.h */,
- F9A4AD6B150566C800D73407 /* MGTwitterStatusesLibXMLParser.h */,
- F9A4AD6C150566C800D73407 /* MGTwitterStatusesLibXMLParser.m */,
- F9A4AD6D150566C800D73407 /* MGTwitterStatusesParser.h */,
- F9A4AD6E150566C800D73407 /* MGTwitterStatusesParser.m */,
- F9A4AD6F150566C800D73407 /* MGTwitterUsersLibXMLParser.h */,
- F9A4AD70150566C800D73407 /* MGTwitterUsersLibXMLParser.m */,
- F9A4AD71150566C800D73407 /* MGTwitterUsersParser.h */,
- F9A4AD72150566C800D73407 /* MGTwitterUsersParser.m */,
- F9A4AD73150566C800D73407 /* MGTwitterXMLParser.h */,
- F9A4AD74150566C800D73407 /* MGTwitterXMLParser.m */,
F9A4AD75150566C800D73407 /* NSData+Base64.h */,
F9A4AD76150566C800D73407 /* NSData+Base64.m */,
F9A4AD77150566C800D73407 /* NSString+UUID.h */,
@@ -412,16 +362,6 @@
F994471014FEFB1B0017A5D8 /* SCTwitter.m in Sources */,
F9A4AD82150566C800D73407 /* MGTwitterEngine.m in Sources */,
F9A4AD83150566C800D73407 /* MGTwitterHTTPURLConnection.m in Sources */,
- F9A4AD84150566C800D73407 /* MGTwitterLibXMLParser.m in Sources */,
- F9A4AD85150566C800D73407 /* MGTwitterMessagesLibXMLParser.m in Sources */,
- F9A4AD86150566C800D73407 /* MGTwitterMessagesParser.m in Sources */,
- F9A4AD87150566C800D73407 /* MGTwitterMiscLibXMLParser.m in Sources */,
- F9A4AD88150566C800D73407 /* MGTwitterMiscParser.m in Sources */,
- F9A4AD89150566C800D73407 /* MGTwitterStatusesLibXMLParser.m in Sources */,
- F9A4AD8A150566C800D73407 /* MGTwitterStatusesParser.m in Sources */,
- F9A4AD8B150566C800D73407 /* MGTwitterUsersLibXMLParser.m in Sources */,
- F9A4AD8C150566C800D73407 /* MGTwitterUsersParser.m in Sources */,
- F9A4AD8D150566C800D73407 /* MGTwitterXMLParser.m in Sources */,
F9A4AD8E150566C800D73407 /* NSData+Base64.m in Sources */,
F9A4AD8F150566C800D73407 /* NSString+UUID.m in Sources */,
F9A4AD90150566C800D73407 /* SA_OAuthTwitterController.m in Sources */,
2  SCTwitter/ExternalFrameworks/Twitter-OAuth-iPhone
@@ -1 +1 @@
-Subproject commit 1b5a7c61bca376a6f28b623de3a2516bccdfd5e2
+Subproject commit 5eb590cecd4bceffdeda3aec254c952494191ba5
View
2  SCTwitter/SCTwitter/SCTwitter.h
@@ -52,6 +52,8 @@ typedef void(^SCTwitterDirectCallback)(BOOL success, id result);
+ (void)getUserTimelineFor:(NSString *)username sinceID:(unsigned long)sinceID startingAtPage:(int)page count:(int)count callback:(void (^)(BOOL success, id result))aCallback;
+ (void)getUserInformationCallback:(void (^)(BOOL success, id result))aCallback;
+ (void)getUserInformationFor:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback;
++ (void)getFriendsCallback:(void (^)(BOOL success, id result))aCallback;
++ (void)getFollowersCallback:(void (^)(BOOL success, id result))aCallback;
+ (void)directMessage:(NSString *)message to:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback;
+ (void)retweetMessageUpdateID:(NSString *)updateID callback:(void (^)(BOOL success, id result))aCallback;
+ (void)postWithMessage:(NSString *)message uploadPhoto:(UIImage *)image callback:(void (^)(BOOL success, id result))aCallback;
View
44 SCTwitter/SCTwitter/SCTwitter.m
@@ -40,6 +40,8 @@ - (void)postWithMessage:(NSString *)message callback:(void (^)(BOOL success, id
- (void)getPublicTimelineWithCallback:(void (^)(BOOL success, id result))aCallback;
- (void)getUserTimelineFor:(NSString *)username sinceID:(unsigned long)sinceID startingAtPage:(int)page count:(int)count callback:(void (^)(BOOL success, id result))aCallback;
- (void)getUserInformationFor:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback;
+- (void)getFriendsCallback:(void (^)(BOOL success, id result))aCallback;
+- (void)getFollowersCallback:(void (^)(BOOL success, id result))aCallback;
- (void)directMessage:(NSString *)message to:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback;
- (void)retweetMessageUpdateID:(NSString *)updateID callback:(void (^)(BOOL success, id result))aCallback;
- (void)postWithMessage:(NSString *)message uploadPhoto:(UIImage *)image latitude:(double)lat longitude:(double)lng callback:(void (^)(BOOL success, id result))aCallback;
@@ -118,6 +120,16 @@ + (void)getUserInformationFor:(NSString *)username callback:(void (^)(BOOL succe
[[SCTwitter shared] getUserInformationFor:username callback:aCallback];
}
++ (void)getFriendsCallback:(void (^)(BOOL success, id result))aCallback
+{
+ [[SCTwitter shared] getFriendsCallback:aCallback];
+}
+
++ (void)getFollowersCallback:(void (^)(BOOL success, id result))aCallback
+{
+ [[SCTwitter shared] getFollowersCallback:aCallback];
+}
+
+ (void)directMessage:(NSString *)message to:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback
{
[[SCTwitter shared] directMessage:message to:username callback:aCallback];
@@ -266,6 +278,38 @@ - (void)getUserInformationFor:(NSString *)username callback:(void (^)(BOOL succe
}
}
+- (void)getFriendsCallback:(void (^)(BOOL success, id result))aCallback;
+{
+ if (![self isSessionValid]) {
+
+ // Call the login callback if we have one
+ if (aCallback) {
+ aCallback(NO, @"Error");
+ }
+
+ }else{
+ self.userCallback = aCallback;
+ [_engine getFriends];
+ }
+}
+
+
+- (void)getFollowersCallback:(void (^)(BOOL success, id result))aCallback;
+{
+ if (![self isSessionValid]) {
+
+ // Call the login callback if we have one
+ if (aCallback) {
+ aCallback(NO, @"Error");
+ }
+
+ }else{
+ self.userCallback = aCallback;
+ [_engine getFollowers];
+ }
+}
+
+
- (void)directMessage:(NSString *)message to:(NSString *)username callback:(void (^)(BOOL success, id result))aCallback
{
if (![self isSessionValid]) {
View
1  SCTwitter/SCTwitterViewController.h
@@ -11,6 +11,7 @@
@interface SCTwitterViewController : UIViewController <UITextFieldDelegate>
@property (retain, nonatomic) IBOutlet UITextField *messageText;
+@property (retain, nonatomic) IBOutlet UIImageView *background;
- (IBAction)loginButtonAction:(id)sender;
- (IBAction)logoutButtonAction:(id)sender;
View
3  SCTwitter/SCTwitterViewController.m
@@ -35,6 +35,7 @@ - (void)viewDidLoad
- (void)viewDidUnload
{
[self setMessageText:nil];
+ [self setBackground:nil];
[super viewDidUnload];
}
@@ -77,7 +78,6 @@ - (IBAction)logoutButtonAction:(id)sender
- (IBAction)postBackgroundButtonAction:(id)sender
{
loadingView.hidden = NO;
-
[SCTwitter postWithMessage:self.messageText.text callback:^(BOOL success, id result) {
loadingView.hidden = YES;
if (success) {
@@ -186,6 +186,7 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField
- (void)dealloc {
[self setMessageText:nil];
+ [_background release];
[super dealloc];
}
View
25 SCTwitter/en.lproj/MainStoryboard.storyboard
@@ -1,13 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1938" systemVersion="11D50b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="2.0" toolsVersion="2840" systemVersion="12C54" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
<dependencies>
- <development defaultVersion="4200" identifier="xcode"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="933"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1926"/>
</dependencies>
<scenes>
+ <!--Twitter View Controller-->
<scene sceneID="5">
<objects>
- <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
<viewController id="2" customClass="SCTwitterViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3">
<rect key="frame" x="0.0" y="20" width="320" height="460"/>
@@ -158,9 +157,11 @@
<color key="backgroundColor" white="0.43430656934306572" alpha="1" colorSpace="calibratedWhite"/>
</view>
<connections>
+ <outlet property="background" destination="U5J-7l-mB7" id="uEr-YI-WH1"/>
<outlet property="messageText" destination="87G-El-0gU" id="FDn-mi-q9e"/>
</connections>
</viewController>
+ <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-1415" y="-44"/>
</scene>
@@ -169,6 +170,22 @@
<image name="Default.png" width="640" height="960"/>
<image name="backgroundButton.png" width="342" height="50"/>
</resources>
+ <classes>
+ <class className="SCTwitterViewController" superclassName="UIViewController">
+ <source key="sourceIdentifier" type="project" relativePath="./Classes/SCTwitterViewController.h"/>
+ <relationships>
+ <relationship kind="action" name="directMessageButtonAction:"/>
+ <relationship kind="action" name="loginButtonAction:"/>
+ <relationship kind="action" name="logoutButtonAction:"/>
+ <relationship kind="action" name="postBackgroundButtonAction:"/>
+ <relationship kind="action" name="publicTimelineButtonAction:"/>
+ <relationship kind="action" name="retweetButtonAction:"/>
+ <relationship kind="action" name="userInformationButtonAction:"/>
+ <relationship kind="action" name="userTimelineButtonAction:"/>
+ <relationship kind="outlet" name="messageText" candidateClass="UITextField"/>
+ </relationships>
+ </class>
+ </classes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackTranslucent"/>
<simulatedOrientationMetrics key="orientation"/>
Please sign in to comment.
Something went wrong with that request. Please try again.