IOS learning to share content with Sina SDK

Source: Internet
Author: User

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:

 
 
  1. # Import <UIKit/UIKit. h>
  2. # Import "SinaUtil. h"
  3. @ Interface iphone_sinaShareViewController: UIViewController {
  4. SinaUtil * sinaUtil;
  5. NSData * selectedImgData;
  6. }
  7. -(IBAction) onClickbutton :( id) sender;
  8. @ End
  9. # Import "iphone_sinaShareViewController.h"
  10. @ Implementation iphone_sinaShareViewController
  11. -(Void) viewWillAppear :( BOOL) animated {
  12. [Super viewWillAppear: animated];
  13. SinaUtil = [[SinaUtil alloc] init];
  14. }
  15. -(Void) didReceiveMemoryWarning {
  16. [Super didReceiveMemoryWarning];
  17. }
  18. -(Void) viewDidUnload {
  19. }
  20. -(Void) dealloc {
  21. [Super dealloc];
  22. }
  23. -(IBAction) onClickbutton :( id) sender
  24. {
  25. [[NSUserDefaults standardUserDefaults] setObject: @ "wangjun@easymorse.com" forKey: @ "userid"];
  26. [[NSUserDefaults standardUserDefaults] setObject: @ "password" forKey: @ "userpw"];
  27. NSURL * url = [sinaUtil getAuthUrlWithData: selectedImgData];
  28. NSLog (@ "11% @", url );
  29. [SinaUtil postString: @ "Wang Jun's test 11" withUrl: url];
  30.  
  31. }
  32. @ 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.