How to get PhoneNumber of twitter user using OAuthTokens?Plz Rply


#1

How can I get the Twitter following and follower Email id and MobileNo in the iPhone sdk Using MGTwitterEngine?

1 down vote favorite

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”]);
}

}
ios xcode email twitter phone


#2

Phone number and email address are not returned by our API.


#3

Hi Taylor,

Thanks for the reply. As you said your APIs don’t provide the contact number and email Id of Followers and followings. So can you please provide me any link or any document for the same. Because It would be more helpful for me.

Regards,
Alok Kumar,


#4

There’s nothing I can provide you. This data is not available in the Twitter API at all.


#5

is twitter providing any method to post a private message.


#6

please see the link