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
#!/bin/bash | |
function pfprint() { | |
if [ -n "$2" ];then | |
sudo pfctl -a "$2" -s"$1" 2>/dev/null | |
else | |
sudo pfctl -s"$1" 2>/dev/null | |
fi | |
} |
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
#import <Socialize/Socialize.h> | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
//set the FB App Id, you can find your FB app Id here: https://developers.facebook.com/apps | |
[Socialize storeFacebookAppId:@"YOUR FB APP ID"]; | |
//your extra code goes here | |
} |
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
//import the socialize header | |
#import <Socialize/Socialize.h> | |
#pragma mark | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | |
// set the socialize api key and secret, register your app here: http://www.getsocialize.com/apps/ | |
[Socialize storeConsumerKey:@"SOCIALIZE_CONSUMER_KEY"]; | |
[Socialize storeConsumerSecret:@"SOCIALIZE_CONSUMER_SECRET"]; | |
//your application specific code |
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
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { | |
// Don't handle notifications when in the foreground | |
if (application.applicationState != UIApplicationStateActive) { | |
return; | |
} | |
// Give Socialize a chance to handle this notification if it needs to | |
if ([Socialize handleNotification:userInfo]) { | |
return; |
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
#import <Socialize/Socialize.h> | |
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation { | |
return [Socialize handleOpenURL:url]; | |
} |
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
// invoke the call | |
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"]; | |
#pragma mark SocializeServiceDelegate implementation | |
// implement the delegate | |
-(void)didAuthenticate{ | |
NSLog(@"Authenticated"); | |
} | |
// if the authentication fails the following method is called |
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
// invoke the call | |
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"]; | |
#pragma mark SocializeServiceDelegate implementation | |
// implement the delegate | |
-(void)didAuthenticate{ | |
NSLog(@"Authenticated"); | |
} | |
// if the authentication fails the following method is called |
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
// invoke the call | |
[socialize authenticateWithApiKey:@"YourApiKey" apiSecret:@"YourApiSecret"]; | |
#pragma mark SocializeServiceDelegate implementation | |
// implement the delegate | |
-(void)didAuthenticate{ | |
NSLog(@"Authenticated"); | |
} | |
// if the authentication fails the following method is called |
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
//import the socialize header | |
#import <Socialize/Socialize.h> | |
@interface Controller : UIViewController | |
@property (nonatomic, retain) SocializeActionBar *actionBar; | |
@end |
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
#import <Socialize-iOS/Socialize.h> | |
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { | |
return [Socialize handleOpenURL:url]; | |
} |
NewerOlder