Advertisement
boardmain

Socialize Module Titanium

Sep 19th, 2014
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. -(void)startup
  2. {
  3. // this method is called when the module is first loaded
  4. // you *must* call the superclass
  5. [super startup];
  6.  
  7. [Socialize storeConsumerKey:@"27b1dca4-e223-4a6c-9042-ce1b8222e600"];
  8. [Socialize storeConsumerSecret:@"c4921e4d-c0b1-42d2-b3ab-5c427f0e2da2"];
  9. [SZFacebookUtils setAppId:@"827787213920034"];
  10. [SZTwitterUtils setConsumerKey:@"HZvyB6i0R4LVL8G2cUKOsHqZh" consumerSecret:@"wJfxlmVcpAKwBsFUIKAECjQ3z4Bdgdakmh9pvq4Ud2Nt86TMKi"];
  11.  
  12. // Specify a Socialize entity loader block
  13. [Socialize setEntityLoaderBlock:^(UINavigationController *navigationController, id<SocializeEntity>entity) {
  14.  
  15. SampleEntityLoader *entityLoader = [[SampleEntityLoader alloc] initWithEntity:entity];
  16.  
  17. if (navigationController == nil) {
  18. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:entityLoader];
  19. [[[TiApp app] controller] presentViewController:navigationController animated:YES completion:nil];
  20. } else {
  21. [navigationController pushViewController:entityLoader animated:YES];
  22. }
  23. }];
  24.  
  25. NSLog(@"[INFO] %@ loaded",self);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement