Can not share image via share kit - iphone

I am new in iPhone and I want to share text and image using share kit.
I request to provide link or complete tutorial for share kit.
I am using below to share to share.
SHKItem *item = [SHKItem image:imageView.image title:#"San Francisco"];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
It shares only text, but not an image.
Thanks in advance.

You have to show it with the toolbar like the below code
[actionSheet showFromToolbar:self.navigationController.toolbar];
Hope it will be help.

Related

share text on facebook from iOS application using sharekit

I want to share some text on facebook using sharekit. I found many solutions but no1 worked for me.
I have imported sharekit and frameworks in my project. Now I want to share text: #"Hello everyone" directly (I mean not to choose from options: mail, twitter, facebook. When I press button share it should share text on facebook, of couse ask log in if it's necessary).
And also I will be glad if you tell me which fields are necessary to fill in the SHKConfig.h file for facebook.
In DefaultSHKConfigurator.m replace the defaultFavoriteTextSharers method with the below Code
- (NSArray*)defaultFavoriteTextSharers {
return [NSArray arrayWithObjects:#"SHKFacebook", nil];
}
Sharing Text
+ (SHKItem *)text:(NSString *)text;
//text - The text you want to share
NSString *someText = #"This is a blurb of text I highlighted from a document.";
SHKItem *item = [SHKItem text:someText];
You can download the ShareKit source files and just watch the ShareKit official project overview video here
You can read the ShareKit documentation here

In share kit is there any way to share multiple items like image, text, url at a time

I want share an image, text, url at a time and i am using share kit.
But here it is sharing only one item at a time.
is there any way to share multiple items like image, text, url at a time.
Plz help me out.
Thanks.
Looking at the documentation here: http://getsharekit.com/docs/
I noticed that it appears as though you can only share one item at a time, which is why they put each type of sharing under a different heading and there is no combination heading.
Why not just create a custom method that implements all these various callbacks into one? Such as creating an array of items and sharing them all at once.
- (void)myButtonHandlerAction
{
// Create an array of items here url, date, etc.
NSURL *url = [NSURL URLWithString:#"http://getsharekit.com"];
SHKItem *item = [SHKItem URL:url title:#"ShareKit is Awesome!"];
// Get the ShareKit action sheet
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
/ Display the action sheet
[actionSheet showFromToolbar:navigationController.toolbar];
}

iPhone - Facebook issue with ShareKit

I am using the below code to integrate facebook sharing in my iPhone App. It works fine most of the time. But some times instead of showing a login window , it displays a blank window and nothing is displayed in that. So user fails to share it on Facebook. I don't know whats going wrong !!
NSURL *url = [NSURL URLWithString:#"http://www.socialdealspot.com"];
SHKItem *item = [SHKItem URL:url title:deal.title];
item.image = [UIImage imageNamed:#"Icon.PNG"];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item];
// Display the action sheet
[actionSheet showFromToolbar:self.navigationController.toolbar];
Has anyone faced this issue before or I am doing something wrong .Please help me !!
I am able to post the first time I logs in. After wards when I try to share something it just displays a blank screen . . . ? Can Any body please look into this . . ??
Thank You !!
This happened to me with Sharekit for about 5 hours on July 3. I chose to wait it out and it fixed itself. Must have been a serverside issue maybe?

Sending Text and Image in one Email via ShareKit

In iPhone App I want to send Image and Text together in single Email Using ShareKit
is it possible to do so?
If yes, How can it be done?
This is what I use:
SHKItem *item = [SHKItem image:myImg title:#"My Awesome Image!!!"];
item.text = #"Look at this awesome Image";
[SHKMail shareItem:item];
and it works well!
ShareKit doesn't seem to have very comprehensive documentation, but from what I could find, it seems your best bet is to share an image and include your text as the title - as an e-mail, this should just work as 'sending an image with text'.

iOS ShareKit, twitter logout? facebook status empty?

I am using ShareKit plugin for iPhone to enable social sharing for the application I'm working on. I set up everything, I stripped it to have Facebook and Twitter services only, connected successfully to both and now I have 1 problem in each of the services...
The problem with Twitter is how to logout/signout...
ShareKit sends the text and the url to Twitter's publish box. It is saving status perfectly. The question is where to put "logout" button for twitter? I want the iPhone user to logout in order to change username. This is done by calling the method
[SHKTwitter logout];.
Now, the problem is where to put the button that will fire this method? In navigationToolbar of Twitter actionSheet I already have 2 buttons and the toolbar (bottom one) is covered by the keyboard?
[EDIT]: I solved this issue by modifying the twitter action sheet. I resized the textView and then added UIToolbar and changed its position so that it fits into the gap between the keyboard and textView. Into the toolbar I added one button with an action that calls a logoutTwitter method
Facebook problem is more of a mystery...
So, in my sharreKitButtonHandler I have the following code:
NSURL *url = [NSURL URLWithString:#"http://www.domain.com"];
SHKItem *shareItem = [SHKItem URL:url title:self.itemTitle.text];
SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:shareItem];
[actionSheet showFromToolbar:self.shareKitToolbar];
This code prepares some ivars of a shareItem object and in the case of Twitter shareKit manages to fill the status box so that user just needs to press publish and its done...
In the case of Facebook it is not working. FB dialog pops out and the share box is empty saying "What's on your mind?" The url and the title are not put into the publish form?
So, please if you have any clue what's going on in the latter problem or how to solve the former problem, I would really appreciate your help...
It takes five lines to add twitter. I wouldn't bother with Sharekit for that.
TWTweetComposeViewController *tweetView = [[TWTweetComposeViewController alloc] init];
[tweetView addImage:imageToShare;
[tweetView addURL:URLToShare];
[tweetView setInitialText:messageToShare];
[senderViewController presentViewController:tweetView animated:YES completion:nil];
I wanted to use sharekit for my projects, but it was difficult to use and after a week I gave up as I couldn't share more than one thing at the same time (URL, Image, Message, etc.) which is pretty useless if you want to promote your app.
Facebook is more difficult, probably a 100 lines. It took me 3-4 days to implement. It will be integrated in iOS 6 just like Twitter :)