My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
InstallationGuideUpdated  
How to Install Satisfaction Remote Component in Your App
Featured, Phase-Deploy
Updated Aug 26, 2009 by davidjc...@gmail.com

How to Install in Your App

  1. Create your company on Get Satisfaction (free or paid): http://getsatisfaction.com/swap
  2. Add your app as a product: http://getsatisfaction.com/[yourcompany]/admin/products
  3. Register your app for an API key:
    • Go to and click "Registering your application": http://getsatisfaction.com/me/extensions
    • Fill in name and description
    • Set Callback URL to something unique (i.e. your app name), like: yourapp://satisfactionRemoteLogin
  4. Switch to Xcode and open your project
  5. Add Security.framework
  6. Add SatisfactionRemoteComponent directory from SVN
  7. Add the header to your app delegate (or elsewhere, but you'll need to edit other steps too):
  8. #import "DCSatisfactionRemoteViewController.h"
  9. Add two methods to your app delegate and set your details (add the first one to your .h too, of course):
  10. - (IBAction)launchSatisfactionRemoteComponent:(id)sender {
    	/*
    	// Get Satisfaction OAuth Key & Secret
    	//   * Register your app at http://getsatisfaction.com/me/extensions
    	// 
    	// companyKey
    	//   * Find it in your GSFN URL: http://getsatisfaction.com/[companyKey]
    	// 
    	// companyName
    	//   * Optional, but recommended.  (displayed in the search bar)
    	// 
    	// productId
    	//   * Optional, used for browsing only one product.
    	//   * Find it by going here and view source: http://api.getsatisfaction.com/companies/[companyKey]/products
    	// 
    	// productName
    	//   * Optional, but must match the product name on GSFN exactly (for posting topics to a product).
    	*/
    
    	DCSatisfactionRemoteViewController *remoteViewController = [[DCSatisfactionRemoteViewController alloc] 
    		initWithGetSatisfactionOAuthKey:@"XXXXXXXXXXXXXXXXX"
    		getSatisfactionOAuthSecret:@"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    		companyKey:@"XXXXXXXXXXXXXXXXX"];
    	remoteViewController.companyName = @"XXXXXXXXXXXXXXXXX";
    	remoteViewController.productId = XXXXX;
    	remoteViewController.productName = @"XXXXXXXXXXXXXXXXX";
    
    	// see if we just returned from logging in via Safari
    	if ([sender isKindOfClass:[NSURL class]]) {
    		remoteViewController.didReturnFromSafari = YES;
    	}
    
    	[[self navigationController] presentModalViewController:remoteViewController animated:YES];
    	[remoteViewController release];
    }
    
    - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    	[self launchSatisfactionRemoteComponent:url];
    	return YES;
    }
  11. Add a button via Interface Builder or code
  12. Connect the action of that button to your "launchSatisfactionRemoteComponent:" method in IB or in code
  13. Add entries to Info.plist (for the URL Scheme):
    • Add new row, type: URL types
    • Under Item 1, set your URL identifier to: com.yourcompany.yourapp
    • Add new row on the URL identifier level, type: URL Schemes
    • Under URL Schemes, set Item 1 to: yourapp (this is used as yourapp://, but don't include the :// here)
  14. Build and Go!

Tips

  • You can set a default product for your company, so all topics will automatically be associated with that product (especially useful if you only have 1 product): http://getsatisfaction.com/yourcompany/admin/products
  • When importing the SatisfactionRemoteComponent directory into your Xcode project, I recommend these settings:

Comment by joshua.a...@gmail.com, May 6, 2010

What is yourapp? The name of the web applicaiton, the url, the name of the iPhone app?

Comment by constant...@gmail.com, Oct 16, 2010

i just fix all bugs and update satisfactionremotecomponent to the latest version of OAuthConsumer http://github.com/Constantine-Fry/Satisfaction-remote-component

Comment by daniel.h...@gmail.com, Nov 19, 2010

My app already uses JanRain? to authenticate the user. Is there anyway I can pass these credentials to the remote component so that my users don't have to login twice to leave a comment?

Comment by chandel....@gmail.com, Apr 22, 2011

cc

Comment by oriens...@gmail.com, Aug 9, 2011

would you please update the link for the Satisfaction-remote-component? I want to download one. thank you

Comment by hinnesl...@gmail.com, Aug 13, 2011

i really need this. would you please give me a link to the satisfactionremotecomponent? thank you


Sign in to add a comment
Powered by Google Project Hosting