Upgrading Twitter

If you were using an earlier version of TapLynx...

You didn’t have to do anything special to make posting to Twitter work.

But Twitter has changed the way their system works, and apps that want to post to Twitter need to do a few things:

  1. Register with Twitter. Start at dev.twitter.com.
  2. Get a consumer secret and consumer key. You’ll get these when you register.
  3. Email Twitter and ask them to enable xAuth access for your app. See this page for the email address where you can send your request. Explain to them that you have an iPhone app that posts to Twitter. You can even mention TapLynx if you want.

Configuration in TapLynx

Once you’ve done the above, then you’ll need to add your consumer secret and consumer key to your app.

In Xcode, select the main.m file. You should see a section that looks like the below. (If you don't see it, copy and paste it in. You can get a copy from main.m in the sample iPhoneApp that comes with TapLynx.)

@interface TLSecrets : NSObject
+ (NSString *)twitterConsumerKey;
+ (NSString *)twitterConsumerSecret;
@end

@implementation TLSecrets
+ (NSString *)twitterConsumerKey {
	//key goes between quotes, as in: return @"46wBr2ArP5rcHH0ZRyNpu";
	return @"";
}
+ (NSString *)twitterConsumerSecret {
	//secret goes between quotes, as in: return @"rYfjQY5fNzzSJ4ywSSrdUROse9a7Wh8dtuN0Ogf6m";
	return @""; 
}
@end

Put your consumer secret and consumer key between the quotes, as described in the comments (lines that start with //) above. (Congratulations! You've just written some Objective-C code!)

What happens if you haven’t done the above yet

You can test posting-to-Twitter in the simulator. It uses a default consumer secret and key for TapLynx.

But those TapLynx keys won’t work on the device. For post-to-Twitter to work on a device, you’ll need your own consumer secret and key.


TapLynx.com
Copyright © 2009-2012 All Rights Reserved.