I have a silly question, which to me is "hard", really need you to help out.
Originally I use this "api.search.live.net/json.aspx" to parse and fetch image data, however, after August 1st, everything down because the system turned into Azure. I obtained a new App Key with paid service, however, I still don't have a clue how to change
from the old one into a new one.
I suggest you take a look at the new docs, especially the migration guide. The root service URIs are different and there's a few other things you'll need to change. You can get the docs on the
Bing Search API Azure Marketplace page. Hopefully, that will help you get started.
NSString * const APP_ID =
@"[myappId]"; // If i wasn't wrong, my App Id should be the same as My primary account key. I know there is another one called "custom ID", do you think i should try that as well?
It looks like you're having a problem with passing your account key. You can use your default account key (the one created for you when you signed up), or you can use one that you create. Either one works.
But I don't see in your code how you're passing that account key to Bing. Basically, you need to send an HTTP authorization header with your request to api.datamarket.azure.com/Bing/Search/etc.
Authorization: Basic xxxx
where xxxx is the base 64 encoded string of this: ":accountKey" or "accountKey:accountKey" - bascially, doesn't matter what's on the left of the colon (:) but you need the colon.
I'm not familiar with the programming language you're using, but it does appear that you're not assembling the service URI correctly. You changed the service root in your BING_SEARCH_PATH, but you're putting in parms (like AppId and Image.Count) that aren't
applicable for the new API.
Beyond that, I'll have to defer to someone who knows this programming language better than me. Meanwhile, study the docs some more to find out which parameters need to be changed. Also, you'll need to figure out how to make an HTTP header for your account
key using your programming language.
You can try the new service URI directly in your browser address bar. You'll get prompted for your key, and the results in your browser will be raw XML (or JSON if you tell Bing that's what you want) but it will help you learn how the new parameters work.
I do know that if you pass bad parms (that is, ones Bing doesn't recognize), it won't just ignore them; it will cause the request to fail. So trying things out directly in the browser can be helpful for learning.