Using ShareKit For Twitter Sharing Only
Example iOS project for iOS using both ShareKit to share a tweet from your application preceeded by a fixed hashtag. The example is using xAuth authentication which requires approval from Twitter.
Steps to create the project:
- Download the lastest version of ShareKit
- Create a project based on the Windows template
- Add the ShareKit folder to your project
- Add the ShareKit button to the navigation bar and add the code to UIViewController for ShareKit (See example code)
- Modify the Twitter section of the SHKConfig.h file. Depending on using oAuth or xAuth you need to make different changes
- Modify the application section of the SHKConfig.h file. I did configure #define SHKMyAppName @”Verkeersles” and #define SHKMyAppURL @”http://www.noorselijster19.com”, you should use your own settings
- To see the standard behaviour build and run the project
- Modify the SHKActionSheet.m file to remove the standard MORE button from the UIActionSheet and the related behaviour
- Modify the SHK.m file to change the accepted types of sharing for text (SHKShareTypeText) e.g. only allow Twitter sharing
- I did remove the Tumblr mail option from the SHKSharers.plist
Now build and run the project
Download the example for TwitterWithHashTags here…
Tags: Code, Download, Example, iOS, iPad, iPhone, ObjC, ShareKit, Twitter
This entry was posted on Saturday, March 26th, 2011 at 3:05 PM and is filed under iOS. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
October 31st, 2011 at 5:11 PM
hello,
It’s app don’t work on iOS 5 (((
February 3rd, 2012 at 9:11 PM
Tried it, no problems here, maybe a few warning as a result of iOS 5 and/or Xcode 4.3?