added logo
This commit is contained in:
parent
1f15ec227c
commit
e58d1ef140
9 changed files with 198 additions and 40 deletions
|
@ -20,6 +20,7 @@
|
||||||
IBOutlet WebView *mentionsView;
|
IBOutlet WebView *mentionsView;
|
||||||
IBOutlet NSWindow *mentionsViewWindow;
|
IBOutlet NSWindow *mentionsViewWindow;
|
||||||
IBOutlet NSMenuItem *globalHotkeyMenuItem;
|
IBOutlet NSMenuItem *globalHotkeyMenuItem;
|
||||||
|
IBOutlet NSImageView *logoLayer;
|
||||||
ViewDelegate *viewDelegate;
|
ViewDelegate *viewDelegate;
|
||||||
OAuth *oauth;
|
OAuth *oauth;
|
||||||
}
|
}
|
||||||
|
@ -29,6 +30,7 @@
|
||||||
@property (retain, nonatomic) IBOutlet WebView *mentionsView;
|
@property (retain, nonatomic) IBOutlet WebView *mentionsView;
|
||||||
@property (retain, nonatomic) IBOutlet NSWindow *mentionsViewWindow;
|
@property (retain, nonatomic) IBOutlet NSWindow *mentionsViewWindow;
|
||||||
@property (retain, nonatomic) IBOutlet NSMenuItem *globalHotkeyMenuItem;
|
@property (retain, nonatomic) IBOutlet NSMenuItem *globalHotkeyMenuItem;
|
||||||
|
@property (retain, nonatomic) IBOutlet NSImageView *logoLayer;
|
||||||
@property (retain, nonatomic) IBOutlet ViewDelegate *viewDelegate;
|
@property (retain, nonatomic) IBOutlet ViewDelegate *viewDelegate;
|
||||||
@property (retain, nonatomic) IBOutlet OAuth *oauth;
|
@property (retain, nonatomic) IBOutlet OAuth *oauth;
|
||||||
|
|
||||||
|
|
23
Controller.m
23
Controller.m
|
@ -31,6 +31,10 @@
|
||||||
selector:@selector(authentificationSucceded:)
|
selector:@selector(authentificationSucceded:)
|
||||||
name:@"authentificationSucceded"
|
name:@"authentificationSucceded"
|
||||||
object:nil];
|
object:nil];
|
||||||
|
[nc addObserver:self
|
||||||
|
selector:@selector(getTweetUpdates:)
|
||||||
|
name:@"getTweetUpdates"
|
||||||
|
object:nil];
|
||||||
|
|
||||||
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
|
NSAppleEventManager *appleEventManager = [NSAppleEventManager sharedAppleEventManager];
|
||||||
[appleEventManager setEventHandler:self
|
[appleEventManager setEventHandler:self
|
||||||
|
@ -50,19 +54,22 @@
|
||||||
|
|
||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
NSInteger defaultsNewTweetKey = (NSInteger)[defaults integerForKey:@"newTweetKey"];
|
NSInteger defaultsNewTweetKey = (NSInteger)[defaults integerForKey:@"newTweetKey"];
|
||||||
if ([NSNumber numberWithInt:defaultsNewTweetKey] != nil) {
|
|
||||||
|
if ([defaults objectForKey:@"newTweetKey"] != nil) {
|
||||||
newTweetKey = defaultsNewTweetKey;
|
newTweetKey = defaultsNewTweetKey;
|
||||||
} else {
|
} else {
|
||||||
[defaults setInteger:newTweetKey forKey:@"newTweetKey"];
|
[defaults setInteger:newTweetKey forKey:@"newTweetKey"];
|
||||||
}
|
}
|
||||||
|
|
||||||
NSInteger defaultsNewTweetModifierKey = (NSInteger)[defaults integerForKey:@"newTweetModifierKey"];
|
NSInteger defaultsNewTweetModifierKey = (NSInteger)[defaults integerForKey:@"newTweetModifierKey"];
|
||||||
if ([NSNumber numberWithInt:defaultsNewTweetModifierKey] != nil) {
|
if ([defaults objectForKey:@"newTweetModifierKey"] != nil) {
|
||||||
newTweetModifierKey = defaultsNewTweetModifierKey;
|
newTweetModifierKey = defaultsNewTweetModifierKey;
|
||||||
} else {
|
} else {
|
||||||
[defaults setInteger:newTweetModifierKey forKey:@"newTweetModifierKey"];
|
[defaults setInteger:newTweetModifierKey forKey:@"newTweetModifierKey"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[defaults synchronize];
|
||||||
|
|
||||||
NSUInteger cocoaModifiers = 0;
|
NSUInteger cocoaModifiers = 0;
|
||||||
if (newTweetModifierKey & shiftKey) cocoaModifiers = cocoaModifiers | NSShiftKeyMask;
|
if (newTweetModifierKey & shiftKey) cocoaModifiers = cocoaModifiers | NSShiftKeyMask;
|
||||||
if (newTweetModifierKey & optionKey) cocoaModifiers = cocoaModifiers | NSAlternateKeyMask;
|
if (newTweetModifierKey & optionKey) cocoaModifiers = cocoaModifiers | NSAlternateKeyMask;
|
||||||
|
@ -115,6 +122,8 @@
|
||||||
[mentionsView setPolicyDelegate:viewDelegate];
|
[mentionsView setPolicyDelegate:viewDelegate];
|
||||||
[mentionsView setUIDelegate:viewDelegate];
|
[mentionsView setUIDelegate:viewDelegate];
|
||||||
[[mentionsView windowScriptObject] setValue:self forKey:@"controller"];
|
[[mentionsView windowScriptObject] setValue:self forKey:@"controller"];
|
||||||
|
|
||||||
|
[logoLayer removeFromSuperview];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector {
|
+ (BOOL)isSelectorExcludedFromWebScript:(SEL)aSelector {
|
||||||
|
@ -157,11 +166,16 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction)sendTweet:(id)sender {
|
- (IBAction)sendTweet:(id)sender {
|
||||||
|
|
||||||
|
[oauth updateTweet:[[sender object] objectAtIndex:0]
|
||||||
|
inReplaToStatus:[[sender object] objectAtIndex:1]];
|
||||||
|
/*
|
||||||
NSString *encodedString = [[[sender object] objectAtIndex:0] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
NSString *encodedString = [[[sender object] objectAtIndex:0] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
|
||||||
[timelineView stringByEvaluatingJavaScriptFromString:
|
[timelineView stringByEvaluatingJavaScriptFromString:
|
||||||
[NSString stringWithFormat:@"twittia_instance.sendNewTweet(\"%@\", \"%@\")",
|
[NSString stringWithFormat:@"twittia_instance.sendNewTweet(\"%@\", \"%@\")",
|
||||||
[encodedString stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""],
|
[encodedString stringByReplacingOccurrencesOfString:@"\"" withString:@"\\\""],
|
||||||
[[sender object] objectAtIndex:1]]];
|
[[sender object] objectAtIndex:1]]];
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *)pluginURL {
|
- (NSString *)pluginURL {
|
||||||
|
@ -189,6 +203,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)getTweetUpdates:(id)sender {
|
||||||
|
[timelineView stringByEvaluatingJavaScriptFromString:@"twittia_instance.getNewData(true)"];
|
||||||
|
[mentionsView stringByEvaluatingJavaScriptFromString:@"twittia_instance.getNewData(true)"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* CARBON */
|
/* CARBON */
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,10 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<integer value="559"/>
|
<integer value="588"/>
|
||||||
<integer value="571"/>
|
<integer value="571"/>
|
||||||
<integer value="535"/>
|
|
||||||
<integer value="81"/>
|
<integer value="81"/>
|
||||||
|
<integer value="559"/>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
@ -829,6 +829,43 @@
|
||||||
<bool key="UseBackForwardList">NO</bool>
|
<bool key="UseBackForwardList">NO</bool>
|
||||||
<bool key="AllowsUndo">YES</bool>
|
<bool key="AllowsUndo">YES</bool>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="NSImageView" id="398890244">
|
||||||
|
<reference key="NSNextResponder" ref="332867700"/>
|
||||||
|
<int key="NSvFlags">274</int>
|
||||||
|
<object class="NSMutableSet" key="NSDragTypes">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<object class="NSArray" key="set.sortedObjects">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<string>Apple PDF pasteboard type</string>
|
||||||
|
<string>Apple PICT pasteboard type</string>
|
||||||
|
<string>Apple PNG pasteboard type</string>
|
||||||
|
<string>NSFilenamesPboardType</string>
|
||||||
|
<string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
|
||||||
|
<string>NeXT TIFF v4.0 pasteboard type</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<string key="NSFrame">{{17, 17}, {363, 547}}</string>
|
||||||
|
<reference key="NSSuperview" ref="332867700"/>
|
||||||
|
<bool key="NSEnabled">YES</bool>
|
||||||
|
<object class="NSImageCell" key="NSCell" id="747210486">
|
||||||
|
<int key="NSCellFlags">67239424</int>
|
||||||
|
<int key="NSCellFlags2">33554432</int>
|
||||||
|
<object class="NSCustomResource" key="NSContents">
|
||||||
|
<string key="NSClassName">NSImage</string>
|
||||||
|
<string key="NSResourceName">Icon</string>
|
||||||
|
</object>
|
||||||
|
<object class="NSFont" key="NSSupport" id="19773046">
|
||||||
|
<string key="NSName">LucidaGrande</string>
|
||||||
|
<double key="NSSize">13</double>
|
||||||
|
<int key="NSfFlags">1044</int>
|
||||||
|
</object>
|
||||||
|
<int key="NSAlign">0</int>
|
||||||
|
<int key="NSScale">3</int>
|
||||||
|
<int key="NSStyle">0</int>
|
||||||
|
<bool key="NSAnimates">NO</bool>
|
||||||
|
</object>
|
||||||
|
<bool key="NSEditable">YES</bool>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<string key="NSFrameSize">{397, 581}</string>
|
<string key="NSFrameSize">{397, 581}</string>
|
||||||
<reference key="NSSuperview"/>
|
<reference key="NSSuperview"/>
|
||||||
|
@ -969,11 +1006,7 @@
|
||||||
<int key="NSCellFlags">67239424</int>
|
<int key="NSCellFlags">67239424</int>
|
||||||
<int key="NSCellFlags2">134217728</int>
|
<int key="NSCellFlags2">134217728</int>
|
||||||
<string key="NSContents">Ok</string>
|
<string key="NSContents">Ok</string>
|
||||||
<object class="NSFont" key="NSSupport" id="19773046">
|
<reference key="NSSupport" ref="19773046"/>
|
||||||
<string key="NSName">LucidaGrande</string>
|
|
||||||
<double key="NSSize">13</double>
|
|
||||||
<int key="NSfFlags">1044</int>
|
|
||||||
</object>
|
|
||||||
<reference key="NSControlView" ref="766838214"/>
|
<reference key="NSControlView" ref="766838214"/>
|
||||||
<int key="NSButtonFlags">-2038284033</int>
|
<int key="NSButtonFlags">-2038284033</int>
|
||||||
<int key="NSButtonFlags2">129</int>
|
<int key="NSButtonFlags2">129</int>
|
||||||
|
@ -1463,6 +1496,14 @@
|
||||||
</object>
|
</object>
|
||||||
<int key="connectionID">584</int>
|
<int key="connectionID">584</int>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBConnectionRecord">
|
||||||
|
<object class="IBOutletConnection" key="connection">
|
||||||
|
<string key="label">logoLayer</string>
|
||||||
|
<reference key="source" ref="408500656"/>
|
||||||
|
<reference key="destination" ref="398890244"/>
|
||||||
|
</object>
|
||||||
|
<int key="connectionID">589</int>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||||
<object class="NSArray" key="orderedObjects">
|
<object class="NSArray" key="orderedObjects">
|
||||||
|
@ -2052,6 +2093,7 @@
|
||||||
<object class="NSMutableArray" key="children">
|
<object class="NSMutableArray" key="children">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<reference ref="690752143"/>
|
<reference ref="690752143"/>
|
||||||
|
<reference ref="398890244"/>
|
||||||
</object>
|
</object>
|
||||||
<reference key="parent" ref="1010634651"/>
|
<reference key="parent" ref="1010634651"/>
|
||||||
</object>
|
</object>
|
||||||
|
@ -2157,6 +2199,20 @@
|
||||||
<reference key="object" ref="829471819"/>
|
<reference key="object" ref="829471819"/>
|
||||||
<reference key="parent" ref="0"/>
|
<reference key="parent" ref="0"/>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">587</int>
|
||||||
|
<reference key="object" ref="398890244"/>
|
||||||
|
<object class="NSMutableArray" key="children">
|
||||||
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
|
<reference ref="747210486"/>
|
||||||
|
</object>
|
||||||
|
<reference key="parent" ref="332867700"/>
|
||||||
|
</object>
|
||||||
|
<object class="IBObjectRecord">
|
||||||
|
<int key="objectID">588</int>
|
||||||
|
<reference key="object" ref="747210486"/>
|
||||||
|
<reference key="parent" ref="398890244"/>
|
||||||
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="NSMutableDictionary" key="flattenedProperties">
|
<object class="NSMutableDictionary" key="flattenedProperties">
|
||||||
|
@ -2331,6 +2387,9 @@
|
||||||
<string>576.IBPluginDependency</string>
|
<string>576.IBPluginDependency</string>
|
||||||
<string>58.IBPluginDependency</string>
|
<string>58.IBPluginDependency</string>
|
||||||
<string>58.ImportedFromIB2</string>
|
<string>58.ImportedFromIB2</string>
|
||||||
|
<string>587.IBEditorWindowLastContentRect</string>
|
||||||
|
<string>587.IBPluginDependency</string>
|
||||||
|
<string>588.IBPluginDependency</string>
|
||||||
<string>72.IBPluginDependency</string>
|
<string>72.IBPluginDependency</string>
|
||||||
<string>72.ImportedFromIB2</string>
|
<string>72.ImportedFromIB2</string>
|
||||||
<string>73.IBPluginDependency</string>
|
<string>73.IBPluginDependency</string>
|
||||||
|
@ -2486,18 +2545,18 @@
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<integer value="1"/>
|
<integer value="1"/>
|
||||||
<string>{{152, 238}, {397, 581}}</string>
|
<string>{{202, 267}, {397, 581}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{152, 238}, {397, 581}}</string>
|
<string>{{202, 267}, {397, 581}}</string>
|
||||||
<boolean value="YES"/>
|
<boolean value="YES"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.WebKitIBPlugin</string>
|
<string>com.apple.WebKitIBPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{226, 247}, {376, 581}}</string>
|
<string>{{602, 245}, {376, 581}}</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>{{226, 247}, {376, 581}}</string>
|
<string>{{602, 245}, {376, 581}}</string>
|
||||||
<boolean value="NO"/>
|
<boolean value="NO"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<integer value="1"/>
|
<integer value="1"/>
|
||||||
|
@ -2518,6 +2577,9 @@
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<integer value="1"/>
|
<integer value="1"/>
|
||||||
|
<string>{{21, 1074}, {48, 48}}</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
<integer value="1"/>
|
<integer value="1"/>
|
||||||
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
|
||||||
|
@ -2552,7 +2614,7 @@
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<nil key="sourceID"/>
|
<nil key="sourceID"/>
|
||||||
<int key="maxID">584</int>
|
<int key="maxID">589</int>
|
||||||
</object>
|
</object>
|
||||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||||
|
@ -2569,6 +2631,7 @@
|
||||||
<object class="NSArray" key="dict.sortedKeys">
|
<object class="NSArray" key="dict.sortedKeys">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>globalHotkeyMenuItem</string>
|
<string>globalHotkeyMenuItem</string>
|
||||||
|
<string>logoLayer</string>
|
||||||
<string>mentionsView</string>
|
<string>mentionsView</string>
|
||||||
<string>mentionsViewWindow</string>
|
<string>mentionsViewWindow</string>
|
||||||
<string>oauth</string>
|
<string>oauth</string>
|
||||||
|
@ -2579,6 +2642,7 @@
|
||||||
<object class="NSMutableArray" key="dict.values">
|
<object class="NSMutableArray" key="dict.values">
|
||||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||||
<string>NSMenuItem</string>
|
<string>NSMenuItem</string>
|
||||||
|
<string>NSImageView</string>
|
||||||
<string>WebView</string>
|
<string>WebView</string>
|
||||||
<string>NSWindow</string>
|
<string>NSWindow</string>
|
||||||
<string>OAuth</string>
|
<string>OAuth</string>
|
||||||
|
@ -2790,6 +2854,22 @@
|
||||||
<string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
|
<string key="minorKey">Foundation.framework/Headers/NSFormatter.h</string>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSImageCell</string>
|
||||||
|
<string key="superclassName">NSCell</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">AppKit.framework/Headers/NSImageCell.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="IBPartialClassDescription">
|
||||||
|
<string key="className">NSImageView</string>
|
||||||
|
<string key="superclassName">NSControl</string>
|
||||||
|
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||||
|
<string key="majorKey">IBFrameworkSource</string>
|
||||||
|
<string key="minorKey">AppKit.framework/Headers/NSImageView.h</string>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="IBPartialClassDescription">
|
<object class="IBPartialClassDescription">
|
||||||
<string key="className">NSMatrix</string>
|
<string key="className">NSMatrix</string>
|
||||||
<string key="superclassName">NSControl</string>
|
<string key="superclassName">NSControl</string>
|
||||||
|
|
BIN
Icon.icns
Normal file
BIN
Icon.icns
Normal file
Binary file not shown.
2
OAuth.h
2
OAuth.h
|
@ -29,5 +29,7 @@
|
||||||
- (id)init;
|
- (id)init;
|
||||||
- (void)requestAToken;
|
- (void)requestAToken;
|
||||||
- (IBAction)requestAccessTokenWithPIN:(id)sender;
|
- (IBAction)requestAccessTokenWithPIN:(id)sender;
|
||||||
|
- (void)updateTweet:(NSString *)tweet inReplaToStatus:(NSString *)statusId;
|
||||||
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
73
OAuth.m
73
OAuth.m
|
@ -30,6 +30,7 @@
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
self.consumerToken = [[OAToken alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET];
|
self.consumerToken = [[OAToken alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET];
|
||||||
self.accessToken = [[OAToken alloc] initWithUserDefaultsUsingServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME];
|
self.accessToken = [[OAToken alloc] initWithUserDefaultsUsingServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME];
|
||||||
|
consumer = [[OAConsumer alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET];
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -49,7 +50,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void)requestAToken {
|
-(void)requestAToken {
|
||||||
consumer = [[OAConsumer alloc] initWithKey:OAUTH_CONSUMER_KEY secret:OAUTH_CONSUMER_SECRET];
|
|
||||||
|
|
||||||
NSURL *url = [NSURL URLWithString:OAUTH_REQUEST_TOKEN_URL];
|
NSURL *url = [NSURL URLWithString:OAUTH_REQUEST_TOKEN_URL];
|
||||||
|
|
||||||
|
@ -102,39 +102,26 @@
|
||||||
|
|
||||||
[request setHTTPMethod:@"POST"];
|
[request setHTTPMethod:@"POST"];
|
||||||
|
|
||||||
|
|
||||||
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
|
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
|
||||||
[fetcher fetchDataWithRequest:request
|
[fetcher fetchDataWithRequest:request
|
||||||
delegate:self
|
delegate:self
|
||||||
didFinishSelector:@selector(accessTokenTicket:didFinishWithData:)
|
didFinishSelector:@selector(accessTokenTicket:didFinishWithData:)
|
||||||
didFailSelector:@selector(requestTokenTicket:didFailWithError:)];
|
didFailSelector:@selector(accessTokenTicket:didFailWithError:)];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)accessTokenTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data {
|
- (void)accessTokenTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data {
|
||||||
|
NSLog(@"%@", ticket);
|
||||||
if (ticket.didSucceed) {
|
if (ticket.didSucceed) {
|
||||||
NSString *responseBody = [[NSString alloc] initWithData:data
|
NSString *responseBody = [[NSString alloc] initWithData:data
|
||||||
encoding:NSUTF8StringEncoding];
|
encoding:NSUTF8StringEncoding];
|
||||||
accessToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody];
|
|
||||||
|
self.accessToken = [[OAToken alloc] initWithHTTPResponseBody:responseBody];
|
||||||
[accessToken storeInUserDefaultsWithServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME];
|
[accessToken storeInUserDefaultsWithServiceProviderName:OAUTH_SERVICE_NAME prefix:APP_NAME];
|
||||||
|
|
||||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
[nc postNotificationName:@"authentificationSucceded" object:self];
|
[nc postNotificationName:@"authentificationSucceded" object:self];
|
||||||
|
|
||||||
/*
|
|
||||||
NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/home_timeline.json"];
|
|
||||||
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
|
|
||||||
consumer:consumer
|
|
||||||
token:accessToken
|
|
||||||
realm:nil
|
|
||||||
signatureProvider:nil];
|
|
||||||
|
|
||||||
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
|
|
||||||
[fetcher fetchDataWithRequest:request
|
|
||||||
delegate:self
|
|
||||||
didFinishSelector:@selector(apiTicket:didFinishWithData:)
|
|
||||||
didFailSelector:@selector(requestTokenTicket:didFailWithError:)];
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -146,6 +133,54 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)accessTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error {
|
||||||
|
NSLog(@"ERROR a: %@", error);
|
||||||
|
//[self requestAccessTokenWithPIN:self];
|
||||||
|
//[twitterPINPanel makeKeyAndOrderFront:self];
|
||||||
|
|
||||||
|
//NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@?oauth_token=%@", OAUTH_USER_AUTHORIZATION_URL, requestToken.key]];
|
||||||
|
//s[[NSWorkspace sharedWorkspace] openURL:url];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateTweet:(NSString *)tweet inReplaToStatus:(NSString *)statusId {
|
||||||
|
|
||||||
|
NSURL *url = [NSURL URLWithString:@"http://api.twitter.com/1/statuses/update.json"];
|
||||||
|
OAMutableURLRequest *request = [[OAMutableURLRequest alloc] initWithURL:url
|
||||||
|
consumer:consumer
|
||||||
|
token:accessToken
|
||||||
|
realm:nil
|
||||||
|
signatureProvider:nil];
|
||||||
|
|
||||||
|
OARequestParameter *source = [[OARequestParameter alloc] initWithName:@"source" value:@"twittia"];
|
||||||
|
OARequestParameter *status = [[OARequestParameter alloc] initWithName:@"status" value:tweet];
|
||||||
|
|
||||||
|
NSMutableArray *params = [NSMutableArray arrayWithObjects:source, status, nil];
|
||||||
|
|
||||||
|
if (statusId) {
|
||||||
|
OARequestParameter *reply = [[OARequestParameter alloc] initWithName:@"in_reply_to_status_id" value:statusId];
|
||||||
|
[params addObject:reply];
|
||||||
|
}
|
||||||
|
|
||||||
|
[request setHTTPMethod:@"POST"];
|
||||||
|
[request setParameters:params];
|
||||||
|
|
||||||
|
OADataFetcher *fetcher = [[OADataFetcher alloc] init];
|
||||||
|
[fetcher fetchDataWithRequest:request
|
||||||
|
delegate:self
|
||||||
|
didFinishSelector:@selector(updateTweetTicket:didFinishWithData:)
|
||||||
|
didFailSelector:@selector(updateTweetTokenTicket:didFailWithError:)];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateTweetTicket:(OAServiceTicket *)ticket didFinishWithData:(NSData *)data {
|
||||||
|
if (ticket.didSucceed) {
|
||||||
|
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||||
|
[nc postNotificationName:@"getTweetUpdates" object:self];
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateTweetTokenTicket:(OAServiceTicket *)ticket didFailWithError:(NSError *)error {
|
||||||
|
NSLog(@"ERROR update tweet: %@", error);
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* MyDocument.xib */; };
|
1DDD582C0DA1D0D100B32029 /* MyDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58280DA1D0D100B32029 /* MyDocument.xib */; };
|
||||||
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
|
1DDD582D0DA1D0D100B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD582A0DA1D0D100B32029 /* MainMenu.xib */; };
|
||||||
|
1F122D49118E1DE100E83B77 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1F122D48118E1DE100E83B77 /* Icon.icns */; };
|
||||||
1F1990C6117BCA960049BEA7 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */; };
|
1F1990C6117BCA960049BEA7 /* ApplicationServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */; };
|
||||||
1F3642EF118C8C35008198EF /* oauth.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642ED118C8C35008198EF /* oauth.js */; };
|
1F3642EF118C8C35008198EF /* oauth.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642ED118C8C35008198EF /* oauth.js */; };
|
||||||
1F3642F0118C8C35008198EF /* sha1.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642EE118C8C35008198EF /* sha1.js */; };
|
1F3642F0118C8C35008198EF /* sha1.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F3642EE118C8C35008198EF /* sha1.js */; };
|
||||||
1F364398118CBC77008198EF /* OAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F364397118CBC77008198EF /* OAuth.m */; };
|
1F364398118CBC77008198EF /* OAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F364397118CBC77008198EF /* OAuth.m */; };
|
||||||
1F36440F118CC173008198EF /* OAuthConsumer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F36440E118CC173008198EF /* OAuthConsumer.framework */; };
|
1F36440F118CC173008198EF /* OAuthConsumer.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1F36440E118CC173008198EF /* OAuthConsumer.framework */; };
|
||||||
1F36465E118DA5A7008198EF /* OAToken+WebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F36465D118DA5A7008198EF /* OAToken+WebView.m */; };
|
1F36465E118DA5A7008198EF /* OAToken+WebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F36465D118DA5A7008198EF /* OAToken+WebView.m */; };
|
||||||
1F4673FE1180F7EA006CC37C /* TwittiaCore.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E61180F654006CC37C /* TwittiaCore.js */; };
|
1F4673FE1180F7EA006CC37C /* TwittiaCore.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E61180F654006CC37C /* TwittiaCore.js */; };
|
||||||
1F4674081180F7EE006CC37C /* jQuery.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E21180F519006CC37C /* jQuery.js */; };
|
1F4674081180F7EE006CC37C /* jQuery.js in Resources */ = {isa = PBXBuildFile; fileRef = 1F4673E21180F519006CC37C /* jQuery.js */; };
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
1F705EA6117889FA00C85707 /* sprite-icons.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F705EA5117889FA00C85707 /* sprite-icons.png */; };
|
1F705EA6117889FA00C85707 /* sprite-icons.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F705EA5117889FA00C85707 /* sprite-icons.png */; };
|
||||||
1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F70619E1178FBB300C85707 /* Carbon.framework */; };
|
1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F70619E1178FBB300C85707 /* Carbon.framework */; };
|
||||||
1F77DB47118C5F1C007C7F1E /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F77DB46118C5F1C007C7F1E /* Constants.m */; };
|
1F77DB47118C5F1C007C7F1E /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F77DB46118C5F1C007C7F1E /* Constants.m */; };
|
||||||
|
1FB074DD118DDAB60013A93C /* OAuthConsumer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F36440E118CC173008198EF /* OAuthConsumer.framework */; };
|
||||||
1FE2FC93117A818D000504B0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; };
|
1FE2FC93117A818D000504B0 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; };
|
||||||
1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; };
|
1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1FE2FC92117A818D000504B0 /* Sparkle.framework */; };
|
||||||
1FFA36CD1177D861006C8562 /* even-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 1FFA36C81177D861006C8562 /* even-bg.png */; };
|
1FFA36CD1177D861006C8562 /* even-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 1FFA36C81177D861006C8562 /* even-bg.png */; };
|
||||||
|
@ -44,6 +46,7 @@
|
||||||
dstPath = "";
|
dstPath = "";
|
||||||
dstSubfolderSpec = 10;
|
dstSubfolderSpec = 10;
|
||||||
files = (
|
files = (
|
||||||
|
1F36440F118CC173008198EF /* OAuthConsumer.framework in CopyFiles */,
|
||||||
1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */,
|
1FE2FCA4117A83B1000504B0 /* Sparkle.framework in CopyFiles */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
@ -56,6 +59,7 @@
|
||||||
13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
13E42FBA07B3F13500E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
||||||
1DDD58290DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MyDocument.xib; sourceTree = "<group>"; };
|
1DDD58290DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MyDocument.xib; sourceTree = "<group>"; };
|
||||||
1DDD582B0DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
1DDD582B0DA1D0D100B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
|
1F122D48118E1DE100E83B77 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = "<group>"; };
|
||||||
1F198FC7117BC4AB0049BEA7 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = "<group>"; };
|
1F198FC7117BC4AB0049BEA7 /* README.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.markdown; sourceTree = "<group>"; };
|
||||||
1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; };
|
1F1990C5117BCA960049BEA7 /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = System/Library/Frameworks/ApplicationServices.framework; sourceTree = SDKROOT; };
|
||||||
1F1990DF117BD2250049BEA7 /* Appcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Appcast.xml; sourceTree = "<group>"; };
|
1F1990DF117BD2250049BEA7 /* Appcast.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = Appcast.xml; sourceTree = "<group>"; };
|
||||||
|
@ -101,7 +105,7 @@
|
||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
1F36440F118CC173008198EF /* OAuthConsumer.framework in Frameworks */,
|
1FB074DD118DDAB60013A93C /* OAuthConsumer.framework in Frameworks */,
|
||||||
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
|
8D15AC340486D014006FF6A4 /* Cocoa.framework in Frameworks */,
|
||||||
1FFA37071177DAF4006C8562 /* WebKit.framework in Frameworks */,
|
1FFA37071177DAF4006C8562 /* WebKit.framework in Frameworks */,
|
||||||
1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */,
|
1F70619F1178FBB300C85707 /* Carbon.framework in Frameworks */,
|
||||||
|
@ -204,6 +208,7 @@
|
||||||
2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
|
2A37F4B8FDCFA73011CA2CEA /* Resources */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
1F122D48118E1DE100E83B77 /* Icon.icns */,
|
||||||
1F1990DF117BD2250049BEA7 /* Appcast.xml */,
|
1F1990DF117BD2250049BEA7 /* Appcast.xml */,
|
||||||
1F198FC7117BC4AB0049BEA7 /* README.markdown */,
|
1F198FC7117BC4AB0049BEA7 /* README.markdown */,
|
||||||
1FE2FCA6117A8952000504B0 /* dsa_pub.pem */,
|
1FE2FCA6117A8952000504B0 /* dsa_pub.pem */,
|
||||||
|
@ -285,6 +290,7 @@
|
||||||
1F4674081180F7EE006CC37C /* jQuery.js in Resources */,
|
1F4674081180F7EE006CC37C /* jQuery.js in Resources */,
|
||||||
1FFA36D01177D861006C8562 /* default.css in Resources */,
|
1FFA36D01177D861006C8562 /* default.css in Resources */,
|
||||||
1F705EA6117889FA00C85707 /* sprite-icons.png in Resources */,
|
1F705EA6117889FA00C85707 /* sprite-icons.png in Resources */,
|
||||||
|
1F122D49118E1DE100E83B77 /* Icon.icns in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -212,18 +212,19 @@ Twittia.prototype.getNewData = function(supress_new_with_timeout) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
Twittia.prototype.sendNewTweet = function(tweet, in_reply_to_status_id) {
|
Twittia.prototype.sendNewTweet = function(tweet, in_reply_to_status_id) {
|
||||||
|
|
||||||
var url = "http://api.twitter.com/1/statuses/update.json";
|
var url = "http://api.twitter.com/1/statuses/update.json";
|
||||||
var data = "source=twittia&status=" + tweet;
|
var data = "source=twittia&status=" + OAuth.percentEncode(tweet);
|
||||||
if(in_reply_to_status_id != '') data += "&in_reply_to_status_id=" + in_reply_to_status_id
|
if(in_reply_to_status_id != '') data += "&in_reply_to_status_id=" + in_reply_to_status_id
|
||||||
|
|
||||||
var parameters = { source: "twittia", status: tweet };
|
var parameters = { source: "twittia", status: tweet };
|
||||||
if(in_reply_to_status_id != '') parameters.in_reply_to_status_id = in_reply_to_status_id
|
if(in_reply_to_status_id != '') parameters.in_reply_to_status_id = in_reply_to_status_id;
|
||||||
|
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
var message = { method:"POST" , action:url, parameters: parameters };
|
var message = { method:"POST" , action:url, parameters:parameters };
|
||||||
|
|
||||||
OAuth.completeRequest(message,
|
OAuth.completeRequest(message,
|
||||||
{ consumerKey : controller.oauth.consumerToken.key
|
{ consumerKey : controller.oauth.consumerToken.key
|
||||||
|
@ -249,12 +250,25 @@ Twittia.prototype.sendNewTweet = function(tweet, in_reply_to_status_id) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
Twittia.prototype.retweet = function(status_id, item) {
|
Twittia.prototype.retweet = function(status_id, item) {
|
||||||
var url = "http://api.twitter.com/1/statuses/retweet/" + status_id + ".json";
|
var url = "http://api.twitter.com/1/statuses/retweet/" + status_id + ".json";
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
|
var message = { method:"POST" , action:url };
|
||||||
|
|
||||||
|
OAuth.completeRequest(message,
|
||||||
|
{ consumerKey : controller.oauth.consumerToken.key
|
||||||
|
, consumerSecret: controller.oauth.consumerToken.secret
|
||||||
|
, token : controller.oauth.accessToken.key
|
||||||
|
, tokenSecret : controller.oauth.accessToken.secret
|
||||||
|
});
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
beforeSend: function(xhr) {
|
||||||
|
xhr.setRequestHeader("Authorization", OAuth.getAuthorizationHeader("", message.parameters));
|
||||||
|
},
|
||||||
url: url,
|
url: url,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string></string>
|
<string>Icon.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>net.jeena.apps.twittia</string>
|
<string>net.jeena.apps.twittia</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
|
Reference in a new issue