Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 85

nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
03/09/13 07:57 PM (12 years ago)

dynacically setting up email, fb, and twitter in quiz action sheet

I am trying to set up the Invisible Facebook and email plugin programatically in a custom quiz plugin like in this thread. https://www.buzztouch.com/forum/thread.php?tid=64A97C87E9AD0EABAAE26EA&command=isSearching&currentPage=1&topicTitle=&createdBy=niraj&repliedBy=&minViews=-1&maxViews=-1&minReplies=-1&maxReplies=-1&forumCategory= The button is in the UIaction sheet. When pressed the Sheet drops down and out of the view, then back up and into the view again. While the FB sheet opens in the background. The Action sheet ends up blocking the FB popup in the background. I have tested this on an ipod touch as well as the emulator and the behavior is the same Image here: http://dl.dropbox.com/u/2452503/buzztouch_screen_shots/invis_fb.jpg This is the code for where I set up and call the Fb plugin. // send to invisible FB -(void)showInvisibleFBScreen { [BT_debugger showIt:self theMessage:@"go to tm facebook screen"]; //BT_item *newItem = int randomID = arc4random() % 99999999; NSString *newID = [NSString stringWithFormat:@"%d", randomID]; NSMutableDictionary *tmpJsonValues = [[NSMutableDictionary alloc] init]; // [tmpJsonValues setObject:newID forKey:@"itemId"]; // [tmpJsonValues setObject:newID forKey:@"itemNickname"]; // [tmpJsonValues setObject:@"Tm_invisiblefacebook" forKey:@"itemType"]; [tmpJsonValues setObject:_tmFbInitialText forKey:@"initialText"]; [tmpJsonValues setObject:_tmFbImageName forKey:@"images"]; [tmpJsonValues setObject:_tmFbURL forKey:@"URLs"]; // dynamically load a new instance of the email plugin BT_item *screenObjectToLoad = [[BT_item alloc] init]; [screenObjectToLoad setItemId:newID]; [screenObjectToLoad setItemNickname:newID]; [screenObjectToLoad setItemType:@"Tm_invisiblefacebook"]; [screenObjectToLoad setJsonVars:tmpJsonValues]; //load next screen if its not nil if(screenObjectToLoad != nil ) { [BT_viewControllerManager handleTapToLoadScreen:[self screenData] theMenuItemData:nil theScreenData:screenObjectToLoad]; }else { //show message [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"%@",NSLocalizedString(@"menuTapError",@"The application doesn't know how to handle this click?")]]; } // [tmpJsonValues release]; //[screenObjectToLoad release]; } I realize this is a bit outside the norm. But if anyone can shed some insights I would appreciate it.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/10/13 12:46 AM (12 years ago)
Your going about it in a very complicated way. I suggest you go and read a few tutorials on integrating social framework. I wouldn't link to another plugin I would hard code it in, then you could actually share the score properly. Remember this quiz plugin restarts the quiz when you move away from it completely. I wouldn't try and copy the invisible twitter plugins code as it is unnecessarily complicated.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/10/13 12:50 AM (12 years ago)
Here's a video of full native action http://www.youtube.com/watch?v=wSLwhGM5vCg&sns=em Also don't forget that the invisible twitter and Facebook work only in ios 6 so you need fall back code or it will crash lower devices.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
03/11/13 12:05 AM (12 years ago)
Thanks for the reply. I definitely hit a dead end with that approach.
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
03/11/13 12:08 AM (12 years ago)
I did have some success with the At tweet sheet doing this. But the other pluggins not so much.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/12/13 06:03 PM (12 years ago)
Kittsy, any chance you can share your code for your twitter, facebook and Game Center integration on the quiz plugin? Especially if you got it working for the latest xcode and plugin versions.
 
LeonG
Apple Fan
Profile
Posts: 694
Reg: Nov 08, 2011
Hamburg
17,740
like
03/17/13 08:51 AM (12 years ago)
no?
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
04/04/13 04:15 PM (12 years ago)
Hi @nadthevlad Can I ask how you added the additional buttons to the action sheet please? This is what i'm trying to do :) https://www.buzztouch.com/forum/thread.php?fid=0BEEE0FF03A43C91ED365D6&tid=0BEEE0FF03A43C91ED365D6 Cheers
 

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.