Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7810743
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T03:54:09+00:00 2026-06-02T03:54:09+00:00

I just test the face.com face recognition api and I have success with json

  • 0

I just test the face.com face recognition api and I have success with json requests:

NSString *url = @"http://api.face.com/faces/detect.json?api_key=myapi&api_secret=mysecret&urls=http://userserve-ak.last.fm/serve/_/47363849/Christina+Aguilera+HQ+PNG.png";

// Create new SBJSON parser object
SBJsonParser *parser = [[SBJsonParser alloc] init];

NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];

// Perform request and get JSON back as a NSData object
NSData *response = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];

// Get JSON as a NSString from NSData response
NSString *json_string = [[NSString alloc] initWithData:response encoding:NSUTF8StringEncoding];

// parse the JSON response into an object
// Here we're using NSArray since we're parsing an array of JSON status objects
NSDictionary *obj = [parser objectWithString:json_string];

//
NSString *status = [obj objectForKey:@"status"];

//
NSLog(@"status: %@", status);

This works when I pass the api key, secret and the IMAGE ON THE WEB as GET params, like:

http://api.face.com/faces/detect.json?api_key=4b4b4c6d54c37&api_secret= &urls= http://farm3.static.flickr.com/2566/3896283279_0209be7a67.jpg

Now, I want to upload a raw image data from my app…but this is not so well documented on the site:

http://developers.face.com/docs/api/faces-detect/

There it says:

Code:
Optional [no name] The raw image data for the photo (when instead of url, an image is uploaded)

This is the problem:

How do I pass the raw data as POST along with the apikey and secret?
I know it must be as POST, but how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T03:54:10+00:00Added an answer on June 2, 2026 at 3:54 am

    Raw data = NSData, so all you need to do is append the imageData to the URL, as done below.

    NSString *url = [NSString stringWithFormat:@"http://api.face.com/faces/detect.json?api_key=myapi&api_secret=mysecret&code=%@", imageData];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this simple test project just to test the IncludeExceptionDetailInFaults behavior. public class
Lets say I have hierarchy like this (This is just a test program. Please
I have a trivial console application in .NET. It's just a test part of
I have a HTTP Handler which does not fire. i just noticed that adding
We're trying to test an API that requires HTTP Basic Access Authentication credentials (http://en.wikipedia.org/wiki/Basic_access_authentication)
Is it just to test compile a simple program, with that header file #included
just trying to test for equality in this piece of code, but getting a
I just finished a test as part of a job interview, and one question
I just had a test on java and we had to give the definition
I've just done a test with bitfields, and the results are surprising me. class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.