Skip to main content
added 3 characters in body
Source Link
Glorfindel
  • 6.9k
  • 3
  • 22
  • 49

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. Its giveIt gives an HTML requestresponse.

I want to show a list of users from Stack Overflow.

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. Its give HTML request.

I want to show a list of users from Stack Overflow.

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth/2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. It gives an HTML response.

I want to show a list of users from Stack Overflow.

Stack Exchange API for getting list of users from iOS8iOS 8

I am trying to call the Stack Exchange API to get a list of users. ThisThis is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? II did not get list of users. Its give HTML request.

I want to show a list of users from Stack Overflow.

Stack Exchange API for getting list of users from iOS8

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. Its give HTML request.

I want to show a list of users from Stack Overflow.

Stack Exchange API for getting list of users from iOS 8

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. Its give HTML request.

I want to show a list of users from Stack Overflow.

added 2 characters in body; edited tags
Source Link
Brock Adams
  • 13k
  • 5
  • 39
  • 64

I am trytrying to call stack exchangethe Stack Exchange API to get a list of stack users. This is from my iOS app.:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

NSURL *url = [NSURL URLWithString:str]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { if (data.length > 0 && connectionError == nil) { NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; } }];

Could any one know whatWhat is the wrong with the call i did, I? I did not get list of users. Its give HTML request.

I want to show a list of users from stack overflowStack Overflow.

I am try to call stack exchange API to get list of stack users from iOS app.

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *connectionError) { if (data.length > 0 && connectionError == nil) { NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data options:0 error:NULL]; } }];

Could any one know what is the wrong call i did, I did not get list of users. Its give HTML request.

I want to show list of users from stack overflow.

I am trying to call the Stack Exchange API to get a list of users. This is from my iOS app:

NSString *str=[NSString stringWithFormat:@"http://stackexchange.com/oauth /2.2/users?order=desc&sort=reputation&site=stackoverflow&Client_Id=5029"]];

NSURL *url = [NSURL URLWithString:str];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[NSURLConnection sendAsynchronousRequest:request
                                   queue:[NSOperationQueue mainQueue]
                       completionHandler:^(NSURLResponse *response,
                                           NSData *data, NSError *connectionError)
 {
     if (data.length > 0 && connectionError == nil)
     {
         NSDictionary *greeting = [NSJSONSerialization JSONObjectWithData:data
                                                                  options:0
                                                                    error:NULL];
     }
 }];

What is wrong with the call? I did not get list of users. Its give HTML request.

I want to show a list of users from Stack Overflow.

Source Link
Loading