SocialLib handles sharing message to multiple social media.

Overview

SocialLib

CI Status Version License Platform

###What is SocialLib? SocialLib is a library that aims to share information to different social media site without getting your code messy with different social media SDKs.

Sharing with SocialLib is simple, you can have the same modal to share to different social media.

Here is an example for the same modal to share to Twitter and Facebook.

InfoModal.h

#import <Foundation/Foundation.h>

@interface InfoModal : NSObject <SocialLibFacebookMessage, SocialLibTwitterMessage>{
    
}

@property (nonatomic, strong) NSString *infoTitle;
@property (nonatomic, strong) NSString *infoContent;
@property (nonatomic, strong) NSString *infoContentURL;
@property (nonatomic, strong) NSArray *infoImages;
@property (nonatomic, strong) NSString *infoThumbnailImageURL;
@property (nonatomic, strong) NSString *infoVideoURL;

InfoModal.m

#import "InfoModal.h"


@implementation InfoModal

#pragma mark - SocialLibMessage
- (NSString *)title{
    return _infoTitle;
}

- (NSString *)content{
    return _infoContent;
}

- (NSString *)contentURL{
    return _infoContentURL;
}

- (NSArray *)images{
    return _infoImages;
}

- (NSString *)thumbnailImageURL{
    return _infoThumbnailImageURL;
}

- (NSString *)videoURL{
    return _infoVideoURL;
}

- (NSString *)tweetContent{
    return [NSString stringWithFormat:@"%@ - %@ %@",_infoTitle, _infoContent, _infoContentURL];
}

- (SocialLibTwitterMessageType)twitterMessageType{
    return SocialLibTwitterMessageTypeText;
}

- (SocialLibFacebookMessageType)fbMessageType{
    return SocialLibFacebookMessageTypeLink;
}

@end

To share facebook use

InfoModal *info = [[InfoModal alloc] init];
info.infoTitle = @"SocialLib";
info.infoContent = @"Share via SocialLib";
info.infoContentURL = @"http://darkcl.github.io/SocialLib";
[SocialLib shareModal:info
           toPlatform:kSocialLibPlatformFacebook
              success:^(NSDictionary *message) {
                  NSLog(@"%@", message);
              }
              failure:^(NSDictionary *message, NSError *error) {
                  NSLog(@"%@", error);
              }];

To share twitter use

InfoModal *info = [[InfoModal alloc] init];
info.infoTitle = @"SocialLib";
info.infoContent = @"Share via SocialLib";
info.infoContentURL = @"http://darkcl.github.io/SocialLib";
[SocialLib shareModal:info
           toPlatform:kSocialLibPlatformTwitter
              success:^(NSDictionary *message) {
                  NSLog(@"%@", message);
              }
              failure:^(NSDictionary *message, NSError *error) {
                  NSLog(@"%@", error);
              }];

Installation

SocialLib is available through CocoaPods. To install it, simply add the following line to your Podfile:

Install all platform (Facebook, Twitter, Tumblr, Instagram, Weibo and Weixin)

pod 'SocialLib'

For specific social platform, use subspec

pod 'SocialLib/Facebook'
pod 'SocialLib/Twitter'
pod 'SocialLib/Tumblr'
pod 'SocialLib/Instagram'
pod 'SocialLib/Weibo'
pod 'SocialLib/Weixin'

Setup Guide

You can find setup guide in the wiki

Usage

To run the example project, clone the repo, and run pod install from the Example directory first. Demo provided Facebook, Twitter and Tumblr api keys, Weibo and Weixin api keys are empty

Author

Yeung Yiu Hung, [email protected]

License

SocialLib is available under the MIT license. See the LICENSE file for more info.

Bitdeli Badge

You might also like...
SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

SharedImages Screen grabs Main Features Private & self-owned social media Users store their images in their own cloud storage (Dropbox or Google Drive

Smart Online Shopping iOS App with Augmented Reality (AR) and simple Social Media features using SwiftUI and Google Firebase Cloud Services
Smart Online Shopping iOS App with Augmented Reality (AR) and simple Social Media features using SwiftUI and Google Firebase Cloud Services

Table of contents App Demo How to Run Context Content How it's written Inspiration App Demo AR.online.shopping.iOS.demo.mp4 How to Run First make sure

C4 is an open-source creative coding framework that harnesses the power of native iOS programming with a simplified API that gets you working with media right away. Build artworks, design interfaces and explore new possibilities working with media and interaction. Kodi is an award-winning free and open source home theater/media center software and entertainment hub for digital media. With its beautiful interface and powerful skinning engine, it's available for Android, BSD, Linux, macOS, iOS and Windows. iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically!
iOS routing done right. Handles both URL recognition and controller displaying with parsed parameters. All in one line, controller stack preserved automatically!

Developed and Maintained by Ipodishima Founder & CTO at Wasappli Inc. (If you need to develop an app, get in touch with our team!) So what is this lib

Handles some of the base configuration to make creating a UIAlertController with text entry even easier. Plus validation!
Handles some of the base configuration to make creating a UIAlertController with text entry even easier. Plus validation!

🍅 FancyTextEntryController A simpler/easier API for adding text fields to UIAlertControllers. Not a custom view, just uses good ol' UIAlertController

🧱 A JSON decoding/encoding library that handles optimistically or strictly.
🧱 A JSON decoding/encoding library that handles optimistically or strictly.

Do you need to handle the root cause of failure in decoding JSON? We often process the value as a default value if it could not be decoded from JSON.

A SwiftUI component which handles logging in with Apple to Firebase
A SwiftUI component which handles logging in with Apple to Firebase

Login with Apple Firebase SwiftUI I made this SwiftUI component to handle logging in with Apple to Firebase. Demo Gif Usage in SwiftUI struct ContentV

Sample app to demonstrate data sharing between a WatchKit app and its main app using Realm
Sample app to demonstrate data sharing between a WatchKit app and its main app using Realm

#Done! A sample app demonstrating how to share data between an app an its Watch extension using Realm. You can read more about it here. ##Screenshot #

iOS On-Device Game Cheat Creation/Sharing Platform and Software

CheatManager CheatManager is a mobile platform, used for installation/distribution/creation of mobile game cheats/hacks. This platform is completely d

TripUp is an open source, photo storage and sharing app made for privacy conscious users.
TripUp is an open source, photo storage and sharing app made for privacy conscious users.

TripUp is an open source, photo storage and sharing app made for privacy conscious users.

Sample app to demonstrate data sharing between a WatchKit app and its main app using Realm
Sample app to demonstrate data sharing between a WatchKit app and its main app using Realm

#Done! A sample app demonstrating how to share data between an app an its Watch extension using Realm. You can read more about it here. ##Screenshot #

A framework for sharing code between iOS and OS X

MAIKit MAIKit (Mac and iOS Kit) is a framework for sharing code between OS X and iOS. UIKit contains many classes which have counterparts in Appkit. T

Ported Shamirs Secret Sharing Into A Swift Package

Shamirs-Secret-Sharing-Swift Ported Shamirs Secret Sharing Into A Swift Package Based on Adi Shamir's Secret Sharing (https://en.wikipedia.org/wiki/Sh

Syntax sugar of OpenTok iOS SDK with Audio/Video communication including screen sharing
Syntax sugar of OpenTok iOS SDK with Audio/Video communication including screen sharing

Accelerator Core iOS The Accelerator Core is a solution to integrate audio/video communication to any iOS applications via OpenTok platform. Accelerat

Easier sharing of structured data between iOS applications and share extensions
Easier sharing of structured data between iOS applications and share extensions

XExtensionItem XExtensionItem is a tiny library allowing for easier sharing of structured data between iOS applications and share extensions. It is ta

Sharing SQL queries between Server and Mobile databases

Sharing SQL queries between Server and Mobile databases Overview As we all know, code is expensive to maintain, and the more complex the code, the mor

A way to represent what you’re sharing.
A way to represent what you’re sharing.

About This project provides a preview of items being shared via UIActivityViewController. Example: // standard activity view controller let vc = UIAct

Easy Proximity-based Bluetooth LE Sharing for iOS

Description Easy Proximity-based Sharing for iOS Perfect for any iOS app that needs to quickly share items with nearby friends, such as groups, photo

Releases(0.0.3a)
Owner
darkcl
Senior Software Engineer @shoplineapp
darkcl
Easy Proximity-based Bluetooth LE Sharing for iOS

Description Easy Proximity-based Sharing for iOS Perfect for any iOS app that needs to quickly share items with nearby friends, such as groups, photo

Laura Skelton 132 Aug 10, 2022
Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Astrian Zheng 55 Jun 28, 2022
Photo-Sharing-App - Photo Sharing App With Swift

Photo Sharing App You can register and log in to this application and share your

Yağız Savran 2 Jun 14, 2022
Jogendra 113 Nov 28, 2022
PhoneGap / Cordova Social Sharing plugin

PhoneGap / Cordova Social Sharing plugin Every now and then kind folks ask me how they can give me all their money. So if you want to contribute to my

null 0 Oct 21, 2021
Unified API Library for: Cloud Storage, Social Log-In, Social Interaction, Payment, Email, SMS, POIs, Video & Messaging.

Unified API Library for: Cloud Storage, Social Log-In, Social Interaction, Payment, Email, SMS, POIs, Video & Messaging. Included services are Dropbox, Google Drive, OneDrive, OneDrive for Business, Box, Egnyte, PayPal, Stripe, Google Places, Foursquare, Yelp, YouTube, Vimeo, Twitch, Facebook Messenger, Telegram, Line, Viber, Facebook, GitHub, Google+, LinkedIn, Slack, Twitter, Windows Live, Yahoo, Mailjet, Sendgrid, Twilio, Nexmo, Twizo.

CloudRail 195 Nov 29, 2021
App which lets two people share their social media details by simply putting one phone on top of the other ("tapping"). Currently in development by Nikita Mounier.

Tap It Tap It enables two people to seamlessly share their social media information (e.g. Instagram, Snapchat, phone number) by simply placing one scr

Nikita Mounier 24 Oct 21, 2022
Social Media platform build with swiftUI and Firebase with google and apple account integration for Signing In Users

Social Media platform build with swiftUI and Firebase with google and apple account integration for Signing In Users . Providing Users availability to upload posts and images add caption allowing other users to comment , with Find section to explore new people , new stories , User Profile section to allow the user to take control of his account .

Devang Papinwar 2 Jul 11, 2022
This is the BlurrMC social media platform for iOS hosted on Apple's CloudKit.

BlurrMC for iOS This is the BlurrMC social media platform for IOS! WOOOOOOO! On this version of the social media platform, you have the full featured

BlurrMC 0 Nov 4, 2021
Microblog-ref-app - A Twitter like social media app that users can share their moments

HiPlace - iOS Table of Contents Introduction HMS Services Getting Started Suppor

null 2 Jan 3, 2022