0

Using the below code we can share a photo through available services on android. Can anyone tell me the equivalent way to share a photo on iphone? Thanks in advance.

            Intent share = new Intent(Intent.ACTION_SEND);
            share.setType("image/*");
            share.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://"+photoPath));
            startActivityForResult(Intent.createChooser(share, "Share Image"), SHARE_CONSTANT);
Blazer
  • 14,259
  • 3
  • 30
  • 53
sachi
  • 2,122
  • 7
  • 30
  • 46

2 Answers2

1

I think the best thing to use in your case to share stuff like text, pictures etc is Sharekit.

Blazer
  • 14,259
  • 3
  • 30
  • 53
0

If you want to do it on Facebook, just import the Facebook SDK in your project and implement the API.

For twitter, there is deep integration in iOS. You can simply import the Twitter framework and call the required methods. You'll be able to do something like this:

TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init];
[twitter addImage:[UIImage imageNamed:@"someImage.png"]];

This not the complete code. On how to add Twitter integration, check this video: http://www.youtube.com/watch?v=PtCtcx6CgOA

mvb
  • 701
  • 1
  • 11
  • 20