I haven't used ShareKit much, but I want to have only three sharing options: Facebook, Twitter, and Email. ShareKit gives far more options, including a More button. However, I don't want the More option, just the three.
In SHKActionSheet.m
of ShareKit:
// Add More button
[as addButtonWithTitle:SHKLocalizedString(@"More...")];
It is super easy now, if you use ShareKit 2.0.
edit SHKSharers.plist to include only sharers you need. In case you do not want to compile unused sharers files, check granular install.
You can hide "more..." button in configurator. The new setting is - (NSNumber*)showActionSheetMoreButton
You can disable favourites reordering in configurator. Normally last used sharer is on the top in ShareKit's action sheet. The new setting is - (NSNumber*)autoOrderFavoriteSharers
Using this way you do not need to change or add any code to ShareKit.
I wanted to have the same thing. I spent days to make ShareKit work without too much success. Ok I was able to post FB, Twitter and Email messages but it was more pain the convenience.
Sharekit is an awesome idea but:
It takes 5 lines to add twitter, about 50 for Facebook and email to support text, URL and photo at the same time.
Twitter: This code sends a message with User editable text, URL (hidden, not editable) and an image. It took me 5 minutes to figure it out.
#import <Twitter/TWTweetComposeViewController.h>
- (IBAction)twitterButton:(id) sender {
TWTweetComposeViewController *tweetView = [[TWTweetComposeViewController alloc] init];
[tweetView setInitialText:@"Check out this app, it's awesome" ];
[tweetView addImage:[UIImage imageNamed:@"MyImage.png"]];
[tweetView addURL:[NSURL URLWithString:appDelegate.appStoreURL]];
[self presentModalViewController:tweetView animated:YES];
}
I really appreciate the effort of creating Sharkit but personally I cannot recommended it unless you really need to support all of those sharers and you happy with limited functionality.
UPDATE: I implemented Facebook sharing myself. It was more difficult than I thought. The main problem is that you cannot upload a photo with a post because Facebook only accept image links. Even worse Facebook does not allow to link to a photo which is uploaded to the user photo album (very easy) as it must be an external link. For static images you can use a URL shortener to get around it but for user generated images pretty much you have to use Amazon S3 or something else. Amazon S3 is super easy to use, I figured out how to use upload files in an hour or so.
If you don't want the More... button, why don't you take out the line of code that adds it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With