Code Monkey home page Code Monkey logo

fwsharekit's Introduction

FWShareKit

Objective-c share kit for easy call share activity(facebook, wechat, line, whatsapp, twitter, weibo, googlePlus, copy link, email, sms )

Screen shots

alt tag alt tag

Usage

ShareKit *shareKit = [ShareKit shareKitWithViewController:self]; NSDictionary *shareEntry = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects: [NSURL URLWithString: @"https://github.com/fillywong/FWShareKit" ], @"title", @"desc", [UIImage imageNamed:@"btn_player_sharevdo"] ,@"tttttitle",nil] forKeys:[NSArray arrayWithObjects:@"url", @"title", @"description", @"images",@"newstitle",nil]] ; [shareKit share:shareEntry];

#Environment Xcode Version 6.1.1 Teting in ios8 & ios7

#Prepare For new project 1.Frmamework need to import
libz.dylib
libm.dylib
libpthread.dylib
SystemConfiguration.framework
CFNetwork.framework
AddressBook.framework
Foundation.framework
CoreMotion.framework
CoreGraphics.framework
CoreText.framework
MediaPlayer.framework
Security.framework
AVFoundation.framework
CoreMedia.framework
Accounts.framework
AssetsLibrary.framework
CoreLocation.framework
StoreKit.framework
Social.framework

2.Project setting in build settings
Other Linker Flags :-ObjC
in info
Set URL Types
info.plist
set FacebookAppID
set FacebookDisplayName

3.AppDelegate need to implement WXApiDelegate, GPPSignInDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [self initGooglePlus]; [self initWeChat]; return YES; }

```- (void)initGooglePlus ```
```{
    [GPPSignIn sharedInstance].clientID = @"698755649817-rabvr3qlsnu2024s93ajtcb66it2hsh6.apps.googleusercontent.com";```
}

 -(void)initWeChat
{
    [WXApi registerApp:@"wxsdeeasaadddd22d6"];
}

 - (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url {
    return [WXApi handleOpenURL:url delegate:self];
}


- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
    if([[url absoluteString] rangeOfString:@"fb"].location != NSNotFound)
    {
        return [FBAppCall handleOpenURL:url
                      sourceApplication:sourceApplication
                        fallbackHandler:^(FBAppCall *call) {
                            NSLog(@"Unhandled deep link: %@", url);
                        }];
    }
    else if ([[url absoluteString] rangeOfString:@"com"].location != NSNotFound)
    {
        return [GPPURLHandler handleURL:url
                      sourceApplication:sourceApplication
                             annotation:annotation];
   }
    else
    {
        return [WXApi handleOpenURL:url delegate:self];
    }
    return NO;
}

//google+
- (void)finishedWithAuth: (GTMOAuth2Authentication *)auth
                   error: (NSError *) error {
    NSLog(@"Received error %@ and auth object %@",error, auth);
}```

fwsharekit's People

Contributors

fillywong avatar

Stargazers

Kamar Shad avatar mario avatar WeZZard avatar  avatar

Watchers

 avatar mario avatar

fwsharekit's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.