Acaccountstore *account = [[Acaccountstore alloc] init];
Acaccounttype *type = [Account Accounttypewithaccounttypeidentifier:acaccounttypeidentifiersinaweibo];
[Account Requestaccesstoaccountswithtype:type Options:nil completion:^ (BOOL Granted, Nserror *error) {
if (granted)
{
Nsarray *array = [Account Accountswithaccounttype:type];
NSLog (@ "account%@", array);
if (Array.count > 0)
{
Slrequest *request = [slrequest Requestforservicetype:slservicetypesinaweibo requestmethod:slrequestmethodget URL:[ Nsurl urlwithstring:@ "Https://api.weibo.com/2/common/get_city.json"] parameters:[nsdictionary dictionarywithobject:@ "001011" forkey:@ "province"];
Request.account = [array objectatindex:0];
[Request performrequestwithhandler:^ (NSData *responsedata, Nshttpurlresponse *urlresponse, NSError *error) {
NSLog (@ "= =%@", responsedata);
Nserror *errorr = nil;
Nsdictionary *dic = [Nsjsonserialization jsonobjectwithdata:responsedata options:nsjsonreadingmutablecontainers error:&errorr];
if (!error)
{
NSLog (@ "Beijing%@", DIC);
}
}];
}
}
}];
IOS social and accounts simple to use