over 10 years ago
Simply to get User uploaded images from Pinterest we need to do following things first:-
-(void)getImages:(id)sender{ NSURL *url = [NSURL URLWithString:@"https://api.pinterest.com/v3/pidgets/users//pins/"]; NSData *postData = [@"" dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES]; NSString *postLength = [NSString stringWithFormat:@"%d", [postData length]]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:300]; [request setHTTPMethod:@"GET"]; [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [request setHTTPBody:postData]; NSError *error = [[NSError alloc] init]; NSHTTPURLResponse *response = nil; NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error]; if (urlData) { NSArray *jsonArray = [NSJSONSerialization JSONObjectWithData:urlData options:0 error:nil]; NSLog(@"%@",jsonArray); } }
Happy Coding :)**
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)