Skip to content
Yeung Yiu Hung edited this page Feb 25, 2016 · 1 revision

In your .pch, add following lines

#import <SocialLib/SocialLib+Tumblr.h>

In your AppDelegate,

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    return [SocialLib connectSocialPlatformWithApplication:application didFinishLaunchingWithOptions:launchOptions];
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
    [SocialLib applicationDidBecomeActie:application];
}

- (BOOL)application:(UIApplication *)application
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
    return [SocialLib handleOpenURL:application
                            openURL:url
                  sourceApplication:sourceApplication
                         annotation:annotation];
}
  1. In Xcode right-click your .plist file and choose "Open As Source Code".

  2. Copy & Paste the XML snippet into the body of your file (<key>CFBundleURLTypes</key> <array>...</array>).

  3. Replace {URL Scheme} to what you want, must be unique:

    <dict>
    	<key>CFBundleURLSchemes</key>
    	<array>
    		<string>{URL Scheme}</string>
    	</array>
    </dict>
  4. Add following lines into body of your file (<dict>...</dict>)

  5. Replace:

    • {URL Scheme} with the same URL Scheme as above.
    • {Tumblr Consumer Key} with your Tumblr App Cosumer key - Register Here.
    • {Tumblr Consumer Secret} with your Tumblr App Cosumer Secret - Register Here.
    <key>TumblrCallbackURL</key>
    <string>{URL Scheme}</string>
    <key>TumblrConsumerKey</key>
    <string>{Tumblr Consumer Key}</string>
    <key>TumblrConsumerSecret</key>
    <string>{Tumblr Consumer Secret}</string>

Clone this wiki locally