This article introducesIOSLearning and using SinaSDKShared content, which was previously written and usedIOS, Publish facebook andTwitterShare the content in the application. The following describes how to use Sina'sSDKShare related content to Sina microwave. It mainly involves parsing the iPhone previously written to transfer FROM form data to add network parts and Sina'sSDK.
The demo I wrote is as follows:
- # Import <UIKit/UIKit. h>
- # Import "SinaUtil. h"
- @ Interface iphone_sinaShareViewController: UIViewController {
- SinaUtil * sinaUtil;
- NSData * selectedImgData;
- }
- -(IBAction) onClickbutton :( id) sender;
- @ End
- # Import "iphone_sinaShareViewController.h"
- @ Implementation iphone_sinaShareViewController
- -(Void) viewWillAppear :( BOOL) animated {
- [Super viewWillAppear: animated];
- SinaUtil = [[SinaUtil alloc] init];
- }
- -(Void) didReceiveMemoryWarning {
- [Super didReceiveMemoryWarning];
- }
- -(Void) viewDidUnload {
- }
- -(Void) dealloc {
- [Super dealloc];
- }
- -(IBAction) onClickbutton :( id) sender
- {
- [[NSUserDefaults standardUserDefaults] setObject: @ "wangjun@easymorse.com" forKey: @ "userid"];
- [[NSUserDefaults standardUserDefaults] setObject: @ "password" forKey: @ "userpw"];
- NSURL * url = [sinaUtil getAuthUrlWithData: selectedImgData];
- NSLog (@ "11% @", url );
- [SinaUtil postString: @ "Wang Jun's test 11" withUrl: url];
-
- }
- @ End
Summary:IOSLearning and using SinaSDKI hope this article will help you with the introduction of the shared content.
Source code: http://easymorse-iphone.googlecode.com/svn/trunk/iphone.sinaShare/
This article from: http://wangjun.easymorse.com /? P = 1229