Skip to content
This repository has been archived by the owner on Jul 31, 2019. It is now read-only.

keith/KSADNTwitterFormatter

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

KSADNTwitterFormatter

A simple class for taking ADN posts and reformatting them to fit into Twitter's length restrictions, taking links into account.

Build Status


How to

Simply call:

+ (NSString *)formatTwitterStringWithString:(NSString *)string andURL:(NSURL *)url;

Passing the two parameters,

  1. The post text that you're planning on formatting
  2. The response URL of your ADN post that will be appended to your Tweet if the post is too long.

EX:

NSString *twitterText = [[KSADNTwitterFormatter shared] formatTwitterStringWithString:postText andURL:[NSURL URLWithString:[responseJSON valueForKeyPath:@"data.canonical_url"]]];

NOTE: Depending on your setup with ADN your canonical_url key may not have the same path.


CocoaPods

If you're using CocoaPods, just add this to your podspec.

pod 'KSADNTwitterFormatter', '0.2.0'

Issues

Submit any issues you find through Github and I'll do what I can to fix them.

About

A simple class for taking ADN posts and reformatting them to fit into Twitter's length restrictions, taking links into account.

Resources

License

Stars

Watchers

Forks

Packages

No packages published