0

I tried to send a photo from my app ( iOS app) using share kit in Xcode to twitter, but I got this error : there was an error while sharing . when I send it by Email or face book it's work, but for twitter I got this error . this is my code to send :

  • (IBAction) SendingImage:(id) sender {

    UIImage *image=self.unfilteredImage; // get

    SHKItem *shareItem =[SHKItem image:image title:@"My App"]; SHKActionSheet *actionSheet =[SHKActionSheet actionSheetForItem:shareItem];

    [actionSheet showInView:self.view];

    //[actionSheet release];

}

skaffman
  • 398,947
  • 96
  • 818
  • 769
Hussain1982
  • 301
  • 2
  • 12

2 Answers2

0

This is more of a comment but I don't see the comment button. I'm trying to do the same thing except for Facebook but i don't have it working yet. What does your storyboard look like? I have the image going to a segue and after the segue it goes to a ViewController with an ImageView overlayed on it. In the ViewWillLoad is where I have code similar to what you have above except it never brings up the Facebook Login or anything at all.

Michele
  • 3,617
  • 12
  • 47
  • 81
  • for face book I tried my api key but it's not working, but when I use this api key in this link http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/ , this is working . but twitter I got error while sharing .. – Hussain1982 May 06 '12 at 06:33
0

Maybe there is something wrong in your DefaultSHKConfigurator.m or (mine is called) ShareKitDemoConfigurator.m? Do you have the hooks set up correctly for twitter? In that file they provide a link so you can set up your id's/hooks for each social network type. I have mine working for Facebook now. Maybe there is something for you to check when you cross-reference with the directions at https://github.com/ShareKit/ShareKit/wiki/Installing-sharekit. That's how I found my errors. They have examples in the example class directory that comes with Sharekit2.0 also. Are you using ShareKit2.0 that they refer to in the above link or the one from the original Sharekit website? It seems that the community has taken over updating the app and maybe you have an old version? When I updated my ShareKit version, I found it helpful to make a backup zip file first just in case anything gets messed up. I had a tough time with that and had to recreate my project. Good luck!

Michele
  • 3,617
  • 12
  • 47
  • 81
  • Did you create a new id on the twitter website for your app? I did that for my Facebook one at [https://developers.facebook.com/docs/mobile/ios/build/]. I'm not sure if twitter has the same type of thing. I had to add that id that I got from that process to my info.plist file. I'm not sure if twitter needs you to do that too. – Michele May 06 '12 at 17:12
  • thank you for your replay I create new app in twitter developer but I always got this error, I use the original share kit because the share kit 2.0 there is many files (missed) all Json kit files are empty and all face book files are empty it's not useful for me .. the original share kit is better but I have this problem with twitter share . – Hussain1982 May 07 '12 at 13:40
  • as for shareKit 2.0 missing files - read installation guide carefully. They are submodules - 3rd party code. Either you easily fetch them using git commands (described in install wiki). If you hate git for whatever reason, you need to download them separately from original authors repos. – Vilém Kurz May 07 '12 at 18:24
  • Definitely check that DefaultSHKConfigurator and it's child class and check the twitter info you entered. I had better luck with the github version and following their directions to use git. Also, did you remove twitter from the list of available social networks/files/folders in the shareKit class directory? I removed my twitter folder because of just needing facebook. Good luck! – Michele May 08 '12 at 17:09
  • I had better luck with the github version and following their directions to use git. When I first switched to the github version of sharekit I had missing files too I think because the project build was still expected them in the old locations. When I re-created my project and did ShareKit the git/github way, that all fixed itself. Be careful with git and notice every single step. Good luck! – Michele May 08 '12 at 17:18