Use asihttprequest to send data to Sina Weibo
Oauth_sina Weibo o oauth.zip Sina API certification, you only need to change the key. H, and change the appkey and appsecret in it to the appkey you applied for on Sina.
Import the real machine to start authentication (WiFi is required), run the app, and enter the Sina website asking you to enter your Weibo account and password for authentication. After the authentication is complete, write down oauthconsumerkey and koauthconsumersecret
Attachment 2: testpost_sinaweibo.zip: A test demo I wrote, sdk3.0 test OK
You only need to change the macro definitions koauthconsumerkey and koauthconsumersecret in the weibodata. h header file to the koauthconsumerkey and koauthconsumersecret you recorded above.
Modify weibodata. M's-(void) getuserinformation function. If you have not logged in to the account, enter your, account, and password.
-(Void) getuserinformation {
Nsuserdefaults * userinformation = [nsuserdefaultsstandarduserdefaults];
Username = [userinformation valueforkey: @ "username"];
Password = [userinformation valueforkey: @ "userpwd"];
If ([usernamelength] <1 & [passwordlength] <1)
{
// You can check it out ..
Username = @"";
Password = @"";
}
}
PS: Thanks to QD, I helped solve some problems. (Send the image, path, [Request setdata: imagedata forkey: @ "pic"];) @ "pic" I always use @ "picture" and @ "photo" to test again .... I did not expect @ "pic" .. I am all sweaty ..
[url = job. php? Action = download & Aid = 17969] oauth_sina Weibo oauth.zip [/url]
[url = job. php? Action = download & Aid = 17970] testpost_sinaweibo.zip [/url]