Yes. It will take a little work but it can be done as follows:
in SHK.m
find this method
+ (NSArray *)favoriteSharersForType:(SHKShareType)type
and change
switch (type)
{
case SHKShareTypeURL:
favoriteSharers = [NSArray arrayWithObjects:@"SHKTwitter",@"SHKFacebook",@"SHKReadItLater",nil];
break;
case SHKShareTypeImage:
favoriteSharers = [NSArray arrayWithObjects:@"SHKTwitter",@"SHKFacebook",@"SHKReadItLater",nil];
break;
case SHKShareTypeText:
favoriteSharers = [NSArray arrayWithObjects:@"SHKTwitter",@"SHKFacebook",@"SHKReadItLater",nil];
break;
case SHKShareTypeFile:
favoriteSharers = [NSArray arrayWithObjects:@"SHKTwitter",@"SHKFacebook",@"SHKReadItLater",nil];
break;
to the following for each instance of the switch statement
favoriteSharers = [NSArray arrayWithObjects:@"SHKFacebook", nil];
or what ever other options you want to support (ie if you only want twitter and facebook add @"SHKTwitter"
, to the array)
that will eliminate the other options but the action sheet that displays the options wont reflect the change and it will still give the more option, which we also need to disable.
So to do that go to SHKActionSheet.m
While in this method you can optionally change the title from "Share" to something more specific, ie. "Share with Facebook and Twitter". To do that, go to the following method and make the change indicated.
+ (SHKActionSheet *)actionSheetForType:(SHKShareType)type
change
SHKActionSheet *as = [[SHKActionSheet alloc] initWithTitle:SHKLocalizedString(@"PUT YOUR NEW TITLE HERE")
delegate:self
cancelButtonTitle:nil
destructiveButtonTitle:nil
otherButtonTitles:nil];
as.item = [[SHKItem alloc] init];
as.item.shareType = type;
then in that same method, remove this line:
// Add More button
[as addButtonWithTitle:SHKLocalizedString(@"More...")];
The reason why we have to remove this is because earlier we removed the more button, and now we have to make sure the code doesn’t confuse any other button with the more button. The more button had to be removed because it revealed options to use other sharing methods we don’t want the user to use. If we didn't remove it, the user would still be able to access a disabled share method.
Hope this helps.