EugeneHoran / Android-FatSecret-REST-API

Implementation of FatSecret REST API. method.search & method.get
14 stars 10 forks source link

No value for foods #3

Open uzair157 opened 9 years ago

uzair157 commented 9 years ago

I implemented your code and there were no errors. I run it on my device but when i search an item in the search bar, on the logcat of eclipse I recieve error "No value for foods". Please help me I am stuck on this issue for past 3 days.

EugeneHoran commented 9 years ago

Did you sign up for their api key for your app?

uzair157 commented 9 years ago

Yes i did get the api key as well as the secret key, still no luck !

I tried copying the project files on another eclipse set up but get following errors in style.xml it states "Error: No resource found that matches the given name: attr 'colorPrimaryDark'.". Please help me, I need this api working for my Final year project.

Thanks alot for responding!

uzair157 commented 9 years ago

error

uzair157 commented 9 years ago

I have identified the function that is causing error. the error is caused by the function shown in the pic below. "foods = food.getJSONObject("food");" is throwing the exception. Please help me with this problem i will be very thankful. errorpic

siddhantjain commented 8 years ago

this might be a very delayed comment, but if the code you posted above is anything to go by, the problem with it is in the line: foods = good.getJSONObject("food"); The string should be "foods". Hence, the code becomes: foods = good.getJSONObject("foods");

andreluizreis commented 7 years ago

2016, I am in the same problem @uzair157. I found that it is a problem with the authentication. { "error": {"code": 8, "message": "Invalid signature: oauth_signature 'YcFEXTtpJHILCdjtqAKgskB2WP4='" }} I don't know if something on the API changed. @EugeneHoran, can you confirm if your code is running correctly with your credentials yet?

andreluizreis commented 7 years ago

@uzair157, @EugeneHoran, I saw now the other post about the "&" at the end of the secret password. Thank you. It is now working.