Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 87

trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
03/31/13 05:47 PM (12 years ago)

Scringo, having problems with the FB

Been using the BTScringo PDF as a guide, and i'm falling at the last hurdle! In the Facebook integration section, it says to do this: 3. In your appDelegate.m file, please add the following lines: - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [ScringoAgent handleOpenURL:url]; } // As you can see it is just below where you called the original SringoAgent // it will allow your users to connect with their FB account, and invite their friends to your app by posting on their wall }//app parsed it's configuration data [ScringoAgent startSession:self.window locationManager:nil andFacebook:nil]; } - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [ScringoAgent handleOpenURL:url]; } But wherever and however i add this, it causes errors. Here is the //app parsed its config data section from my appDelegate.m: }//app parsed it's configuration data [ScringoAgent startSession:@"myscringoappnumberhere" locationManager:nil]; [ScringoAgent setTestMode:NO]; } Frustrating, as its connecting to Twitter ok, just the darn FB! I have put my FB dev app code into bt_info.plist so thats not an issue :o/ BT2.0 Scringo whateverthelatestoneis where am i going wrong?? thanks in advance :)
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/31/13 06:14 PM (12 years ago)
What pdf are you talking about? Here's the website with the guide for Facebook integration: https://dev.scringo.com/resources.php?resource=guides If you've added the url scheme in your plist file, and already did the basics with scringo, then all you need to do now is add the below two methods in your appDelegate.m file. I put them at the very end just before the //dealloc section. -(BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url { return [ScringoAgent handleOpenURL:url]; } -(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation{ return [ScringoAgent handleOpenURL:url]; } josh
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
03/31/13 06:23 PM (12 years ago)
so i do that, and it builds ok and runs on my device, but 'Connect' Facebook just doesnt do anything except launch FB n a new window
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
03/31/13 06:25 PM (12 years ago)
its this bit: [ScringoAgent startSession:self.window locationManager:nil andFacebook:nil]; } that seems to cause the problems
 
trouty
I hate code!
Profile
Posts: 338
Reg: Mar 26, 2013
London Outskirt...
4,830
like
04/01/13 05:01 AM (12 years ago)
Ok, i got it working. I'm not entirely sure how though, which doesn't help my learning curve. Still lots to learn with Scringo though i think, such as how to get it to work with BT Quiz (i've managed to get it to post when the quiz has been started, but not with a score at quiz end), and Twitter Invite doesnt put any pre-set text in the tweet. Fb invite works, except that it links to s3.amazonaws.com - i suspect that's because my app isnt on itunes yet and once i update scringo control panel with the iTunes url that will work (in theory) As there now a Scringo forum, i'll direct my scrinquestions over there when it comes to it :o)
 

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.