how to post URL with Image on facebook by ShareKit
2011-12-18 22:14
561 查看
Sharekit
- sending a url link to facebook
up vote0down votefavorite share [fb]share [tw] | Below is the method I'm using with Sharekit to send an image and a title to facebook. I also want to send a URL along with the facebook post. If I trySHKItem *item = [SHKItem image:image url:url title:titleString]; I get a too many arguments error message. Does anyone have any ideas on how this should be done? thanks for any help. - (IBAction)myButtonHandlerAction { NSURL *url = [NSURL URLWithString:@"http://example.com/"]; NSString *titleString = [[NSString alloc] initWithFormat:@"*** %@ * \n\nGet the ***** App - It's Free!", entity.name]; UIImage *image = [[[UIImage alloc] initWithData:entity.image] autorelease]; SHKItem *item = [SHKItem image:image title:titleString]; // Get the ShareKit action sheet SHKActionSheet *actionSheet = [SHKActionSheet actionSheetForItem:item]; // Display the action sheet [actionSheet showFromBarButtonItem:barbtn animated:YES]; } iphone objective-c ios facebook sharekit
| ||
feedback |
2 Answers
activeoldestvotesup vote1down voteaccepted | There is no method -[SHKItem image:url:title:]. So an error is being raised. Currently there is no mechanism to do what you require using ShareKit so you will have to customize ShareKit for your needs. You should also look at the Graph API.
| ||
feedback |
up vote0down vote | Maybe what you want is a url item, with an image attached to it. If so, you can do this :SHKItem *item = [SHKItem URL:[NSURL URLWithString:@"http://example.com/"] title:@"Check this link"]; [item setCustomValue:@"http://example.com/someimage.jpg" forKey:@"picture"]; [SHKFacebook shareItem:item]; I've implemented this with the latest sharekit, it works for me.
| ||
|
相关文章推荐
- iPhone - How to send image + text on facebook using sharekit
- How to share on Facebook obout iOS?
- How to get response content with specified post data by post method
- How to populate the datagrid on background thread with data binding by using Visual C#
- How to Create Text Image on the fly with ASP.NET
- How to load an ImageView by URL in Android
- how to use UrlConnection to post/get request with basic authorization?
- Step by Step - How to create a c++ library with NDK on Android Studio 1.5 (not experimental way)
- how to tag a photo to be used as a thumbnail when page is linked to on facebook
- Learn to securely share files on the blockchain with IPFS!
- How to set up CI System by Jenkins +Maven+Sonar with git
- 【转】How to install and configure SharePoint Server 2010 SP1 on the existing SP 2010 Farm
- How to enable Drupal Clean URL with Nginx
- How to create physical standby database with 11g RMAN DUPLICATE FROM ACTIVE DATABASE [ID 747250.1]
- How To Setup a Rails 4 App With Apache and Passenger on CentOS 6
- How To Install WordPress with LAMP on Ubuntu 16.04
- UINavigationBar:How to add background image with UINavigationController?
- How To Do A JavaScript Cross-Domain POST or GET With jQuery or XMLHttpRequest
- how to update facebook share link, titile, description
- How to read out WhatsApp messages with Tasker and react on their content in real time