0

In my application now I am sharing an image along with a separate website link. I want to attach a link to the image so that on clicking the image, it will direct the user to the respective website.In android it is possible.

Now I am using a social framework. It can be done by using Facebook SDK I guess. Any suggestion on how to do this? Have anyone already did this? please help me with the code. Thank you in advance.

I have searched for this one. I came across graph story and all..which one to use? I am not getting any idea. I am not having enough time to spend.

Mr.Kushwaha
  • 491
  • 5
  • 14
abhimuralidharan
  • 5,752
  • 5
  • 46
  • 70

1 Answers1

0

Have a look at this stackoverflow question: How to Post to Facebook on iOS 6 in Objective-C using ACAccountStore class

But in essence you need to use the iOS Accounts and Social framework to post to Facebook or Twitter.

You can then use it to post images, text, links, hashtags and more.

Community
  • 1
  • 1
  • can i attach a link to an image using social framework? – abhimuralidharan Mar 18 '15 at 14:30
  • @AbhilashKM Link to an image which is stored online? Yes you can. When making the Facebook post using the iOS Social framework, you can make use of the `addURL` method and add a URL to anything you like. –  Mar 18 '15 at 14:33
  • its not a link to an image online.I need an image which when clicked should direct you to a website...say www.google.com – abhimuralidharan Mar 18 '15 at 14:45
  • @AbhilashKM Right so you want to upload an image to Facebook via your iOS app. And when the image is uploaded to Facebook, if anyone clicks on that image, then they will be redirected to a URL which you specify. Well this would require something like HTML or a perhaps look at the Facebook API endpoints to see if it supports setting an image to link to a URL. But the best and easiest way is to just use the `addURL` method like I said. This will upload a URL with the image to Facebook. It will display right under the image. So people will not find it hard to find. Just try it out first. –  Mar 18 '15 at 14:51
  • can you answer this?http://stackoverflow.com/questions/29443818/can-we-add-ios-share-extensions-to-our-projectsfacebook-share – abhimuralidharan Apr 04 '15 at 09:16