How can I get the Twitter following and follower Email id and MobileNo in the iPhone sdk Using MGTwitterEngine?
Posted
by
user1808090
on Stack Overflow
See other posts from Stack Overflow
or by user1808090
Published on 2012-11-08T04:31:08Z
Indexed on
2012/11/08
5:02 UTC
Read the original article
Hit count: 196
I'm unable to get the Twitter following and Followers Email id and MobileNo i am using below code for that using below code i am able to get only Twitter following name and Id Please help?
if([[NSUserDefaults standardUserDefaults] valueForKey:@"UseridLoop"]==nil)
{
urlString = [NSString stringWithFormat:@"https://api.twitter.com/1/friends/ids.json?cursor=-1&user_id=%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"Userid"]];
}
else
{
urlString = [NSString stringWithFormat:@"https://api.twitter.com/1/followers/ids.json?cursor=-1&user_id=%@",[[NSUserDefaults standardUserDefaults] valueForKey:@"UseridLoop"]];
}
NSURLRequest *notificationRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:urlString]];
NSHTTPURLResponse *response;
NSError *error;
NSData *responData;
responData = [NSURLConnection sendSynchronousRequest:notificationRequest returningResponse:&response error:&error];
NSLog(@"%@",responData);
NSString *dataString = [[NSString alloc] initWithData:responData encoding:NSUTF8StringEncoding];
// NSDictionary *dict = [[NSDictionary alloc] initWithDictionary:(NSDictionary *)[dataString JSONValue]];
// // NSMutableDictionary *globalCelebDict=[[NSMutableDictionary alloc]initWithDictionary:(NSMutableDictionary *)[dataString JSONValue ] ];
// //NSMutableDictionary *globalCelebDictNext=[[NSMutableDictionary alloc]initWithDictionary:(NSMutableDictionary *)[[ globalCelebDict objectForKey:@"GetGroupDetailsResult"] JSONValue]];
// NSLog(@"dict %@",dict);
SBJSON *json = [[SBJSON alloc] init];
NSMutableDictionary *customDetailDict=[[NSMutableDictionary alloc]init];
customDetailDict=[json objectWithString:dataString error:&error];
// NSDictionary *customDetailDict = [json objectWithString:dataString error:&error];
NSLog(@"%@",customDetailDict);
if (customDetailDict!=nil) {
array=[[customDetailDict objectForKey:@"ids"]retain];
NSLog(@"%@",array);
NSLog(@"%d",[array count]);
[[NSUserDefaults standardUserDefaults]removeObjectForKey:@"UseridLoop"];
NSLog(@"%@",[[NSUserDefaults standardUserDefaults]valueForKey:@"UseridLoop"]);
}
}
© Stack Overflow or respective owner