Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 24    Views: 178

Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
11/09/12 06:30 AM (11 years ago)

Socialize Integration Need Help!

Hi I have spent days trying to integrate Socialize into my BT 2.0 iOS app, but getting nowhere. I have followed the guides in the forum, but the guide I have followed doesn't work for me. Currently I keep get a 'Thread 1: breakpoint 1.1 2.1' next to this piece of code: #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:@"a9c1bfa0-1f4d-4b35-8112-c3299e84052f"]; (thread break is here) [Socialize storeConsumerSecret:@"97449242-3482-4809-a9aa-f4c3e9050fa4"]; I know its suppose to be an easy integration but not for me, proving extremely difficult for me. Can anyone help.
 
andydahl
Aspiring developer
Profile
Posts: 209
Reg: Jul 20, 2011
Villa Grove
4,540
like
11/09/12 08:00 AM (11 years ago)
I would like clarification on this, too. Scringo was easy, but Socialize (what I'd rather use) is proving difficult for me, also. Andy
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/09/12 08:08 AM (11 years ago)
What exactly are you trying to do with socialzie? Do you want the action bar on every screen or just certain ones?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 09:10 AM (11 years ago)
Hi Mutzy thanks for the reply, right now not fussed, which ever is easiest, just want to get it to appear without the app force closing or multiple errors.
 
andydahl
Aspiring developer
Profile
Posts: 209
Reg: Jul 20, 2011
Villa Grove
4,540
like
11/09/12 09:10 AM (11 years ago)
I'm not trying to hijack Dragon007's thread, but I'm just trying to get it to work at all! Last weekend I was never able to get the SDK integrated into Xcode. Launching would generate errors. Scringo, on the other hand, seemed very straight-forward. What is the best tutorial or docs for integrating Socialize into an app? Thanks, Andy
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/09/12 10:08 AM (11 years ago)
Okay, I assume you followed their "getting started guide" exactly? Especially step 3? It's case sensitive and if you do it wrong it'll cause problems. http://socialize.github.com/socialize-sdk-ios/getting_started.html And if so, you're copying the scringo code in your appDelegate.m file, right? Did you import the scringo header file in that same file? If not put: #import <Socialize/Socialize.h> Any luck?
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 10:18 AM (11 years ago)
Hi Andy no worries, we are in the boat together.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 10:21 AM (11 years ago)
Hi Mutzy confused, Socialize or Scringo? Me and Andy's issue is implementing Socialize into BT 2.0 iOS app. I have followed the Socialize guide to the letter, although knowing where to add the code is an issue. I followed a guide on one of the forum posts but it didn't work for me, plus I'm guessing Socialize have updated their SDK since that post and that maybe the reason why I cannot get it going.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/09/12 10:27 AM (11 years ago)
I meant socialize... whoops. So you imported the socialize header in your appDelegate.m file? That part isn't entirely clear in their instructions. Here's a screenshot of what my appDelegate.m file looks like: https://www.dropbox.com/s/a7yqp66463b1tfj/socialize.png
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 10:31 AM (11 years ago)
Hi Mutzy straight away I have noticed that your source code in your screen shot is different to the guide on the BT forum post I have been following. Any chance you can do some more screen shots as a step by step guide it would really help.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/09/12 10:52 AM (11 years ago)
The only difference in my code may be the lines for Facebook and Twitter which comes later. Ignore those two lines for now. All I did was follow the directions on the Socialize Getting Started page and watched some of their videos that bring you through step by step: http://vimeo.com/31403067 You should be able to get to step 4 of the below guide and compile without errors: http://socialize.github.com/socialize-sdk-ios/getting_started.html#installing-the-sdk My first attempt failed for whatever reason so I deleted all the code and the socialize framework and started over... worked fine on second attempt. But I didn't do anything not listed on their website. So try watching the video. If you still can't get it to work let me know... maybe you can email me your package and I can take a look
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 11:02 AM (11 years ago)
Hi Mutzy I'm afraid I'm not strong coder and although I understand Socialize instructions, knowing where to place the code is a different matter. Below is a link to a thread I was following on BT as my guide: https://www.buzztouch.com/forum/thread.php?tid=E1C5E1E2D2752CFDADB9103&command=isSearching&currentPage=1&topicTitle=socialize&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= Having screen shots or a video tutorial implementing Socialize into a BT app would help. I will try again but your screen shot is different to the link I have just added (to me it does) so know I'm even more confused.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/09/12 11:35 AM (11 years ago)
The only file you add any code to is the appDelegate.m file. When you download your project the file should look like this at the top: #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "BT_downloader.h" #import "JSON.h" #import "BT_strings.h" #import "BT_fileManager.h" #import "BT_audioPlayer.h" #import "BT_dates.h" #import "BT_color.h" #import "BT_application.h" #import "BT_viewControllerManager.h" #import "BT_debugger.h" #import "BT_background_view.h" #import "erres2_appDelegate.h" @implementation erres2_appDelegate @synthesize window, refreshingView, globalBackroundView, spinner, configurationFileName, saveAsFileName, modifiedFileName; @synthesize configData, rootApp, downloader, showDebugInfo, isDataValid, audioPlayer; @synthesize soundEffectNames, soundEffectPlayers, allowedInputCharacters, receivedData; /* didFinishLaunchingWithOptions this method fires when the application first launches. This is different than when it becomes the active application in a multi-tasking environment */ -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ //set the configuration file name configurationFileName = @"BT_config.txt"; //show debug in output window? showDebugInfo = TRUE; ----------------------------------------- step 1. import the socialize header (look at my screenshot to see where I put it #import <Socialize/Socialize.h> step 2. paste the socialize code below just above //set the configuration file name (see my screenshot) // set the socialize api key and secret, register your app here: http://www.getsocialize.com/apps/ [Socialize storeConsumerKey:@"a9c1bfa0-1f4d-4b35-8112-c3299e84052f"]; (thread break is here) [Socialize storeConsumerSecret:@"97449242-3482-4809-a9aa-f4c3e9050fa4"]; then try to recompile.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/09/12 11:40 AM (11 years ago)
Hi Mutzy I will try this; thank you so much for your patients. I have to go out now but I will try your example and will let you know how I get on. Again, thank you and I hope Andy is also able to now get his working, through your help.
 
andydahl
Aspiring developer
Profile
Posts: 209
Reg: Jul 20, 2011
Villa Grove
4,540
like
11/09/12 12:24 PM (11 years ago)
Thanks alot for your guidance. I will report back after I find time to try and integrate Socialize again! Regards, Andy
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/10/12 08:11 AM (11 years ago)
Hi Mutzy I have followed your guide and have managed to compile, but I don't see the Socialize bar/feature. What do I need to get it to show?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/10/12 09:39 AM (11 years ago)
So now we're back to what exactly do you want to do with Socialize. All I did, and all I can help you with, is to add it to each plugin individually and use the text from the navigation bar as the "entity". I personally only use it on html screens so that's the only place I have the socialize bar. Other people in buzztouch also use it in image galleries but have it appear for each image. Here is the post I followed: http://www.buzztouch.com/forum/thread.php?tid=636C21D83FA0566EE3B72BD&command=isSearching&currentPage=1&topicTitle=socialize&createdBy=&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= Once you get the action bar to appear then you have to go back to the socialize getting started page to set up facebook and twitter.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/10/12 10:36 AM (11 years ago)
Hi Mutzy sorry for the delay. I would like to add to a blank screen, but the link you have posted I have tried to use and struggled with and keep getting errors all to do with the action bar and I guess this is where I am stuck and unable to implement.
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/10/12 10:46 AM (11 years ago)
taking off for the rest of the weekend in a bit but this will get you going... step 1. open up whatever plugin it is you want to use. BT_screen_blank it looks like? step 2. open the .h file in xcode step 3. you have to import socialize. so add: #import <Socialize/Socialize.h> step 4. you have to declare the properties. so add: @property (nonatomic, retain) SZActionBar *actionBar; @property (nonatomic, retain) id<SZEntity> entity; For step 3 and 4 just add these where you see the other #import and @property lines step 5. close the .h file and open the .m file step 6. go down to the "view will appear method". Paste the following code above //flag this as current screen: NSString *htmlEntity = [NSString stringWithFormat:@"%@", [BT_strings getJsonPropertyValue:screenData.jsonVars:@"navBarTitleText":@""]]; if (self.actionBar == nil) { self.entity = [SZEntity entityWithKey:htmlEntity name:htmlEntity]; self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectZero entity:self.entity viewController:self]; self.actionBar = [SZActionBarUtils showActionBarWithViewController:self entity:self.entity options:nil]; } So when you're done it should look like this: //view will appear -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [BT_debugger showIt:self:@"viewWillAppear"]; NSString *htmlEntity = [NSString stringWithFormat:@"%@", [BT_strings getJsonPropertyValue:screenData.jsonVars:@"navBarTitleText":@""]]; if (self.actionBar == nil) { self.entity = [SZEntity entityWithKey:htmlEntity name:htmlEntity]; self.actionBar = [SZActionBar defaultActionBarWithFrame:CGRectZero entity:self.entity viewController:self]; self.actionBar = [SZActionBarUtils showActionBarWithViewController:self entity:self.entity options:nil]; } //flag this as the current screen erres2_appDelegate *appDelegate = (erres2_appDelegate *)[[UIApplication sharedApplication] delegate]; appDelegate.rootApp.currentScreenData = self.screenData; That's it. That will make the text of your navigation bar the "entity" for that screen. So you can't have more than one screen with the same title or it'll get confused. Recompile and you should see it appear. Then log in to socialize and you should see that the entity (the navigation bar text) was automatically created. Good luck, I'll check back tomorrow night.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/10/12 10:51 AM (11 years ago)
Thanks so much, will try now and let you know how I get on. Have a good weekend!
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/10/12 11:20 AM (11 years ago)
Hi Mutzy its working now; thank you so much, you've made my day. On to the last part now, but cannot thank you enough.
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/12/12 04:53 AM (11 years ago)
Hi Mutzy sorry to bother you again, but I'm stuck on the Facebook integration within Xcode. I have setup my Facebook app in Facebook and have my FB ID, but setting it up in Xcode, I'm struggling with as it appears I may have done it wrong as I cannot add any comments. Can you help?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
11/12/12 03:46 PM (11 years ago)
Did you follow the directions on the socialize website for FB integration? http://socialize.github.com/socialize-sdk-ios/facebook.html That's all I did. What's tripping you up exactly? You only have to do the first few steps. Stop when you get to "Linking with existing Facebook credentials".
 
Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
like
11/13/12 02:38 AM (11 years ago)
Hi Mutzy sorry for late reply. Basically the section on setting up the URL Types in Xcode is where I'm a little confused and not sure if I have setup right, plus am I right in thinking I will need to add more code to my project? I would also like to setup Twitter.
 
BuzzMkt
Apple Fan
Profile
Posts: 131
Reg: Apr 10, 2011
Italy
2,710
like
11/21/12 06:40 AM (11 years ago)
If you have solved the problem read my new forum post....i will pay to everyone configure it for me....if interested contact me.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.