How to Make a request using fatsecretplatform API.

292 views
Skip to first unread message

Gurinder Kaur

unread,
Jul 21, 2017, 7:23:13 PM7/21/17
to FatSecret Platform API
Hi all,

I am working on ionic 2 app that is to calcute the food calories ,nutrients and I use fatsecretplatform  for api to integrate into my app.

At a very first level I want to search specific food item so that I can render the results food item into  it .I am using  the food.search api.

I am not able to Figure it out how to give  "oauth_timestamp" &  "oauth_signature".I tried it by getting system current time in seconds/milliseconds but always gives 
"{ "error": {"code": 8, "message": "Invalid signature: oauth_signature 'a406465f463d4363ad8509f501fc7444'" }}" error.

"http://platform.fatsecret.com/rest/server.api?search_expression=pizza&method=foods.search&oauth_consumer_key=c30c2d5cf2de45d5bf2b02544a026ccf&oauth_nonce=69m7nw1f8p&oauth_signature=a406465f463d4363ad8509f501fc7444&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1500643004&format=json&oauth_version=1.0"


then I change the  "oauth_signature" value to "c30c2d5cf2de45d5bf2b02544a026ccf&a406465f463d4363ad8509f501fc7444"  which I read somewhere then it gives me below error:

{ "error": {"code": 1, "message": "An unknown error occurred: Object reference not set to an instance of an object." }}



Kindly anyone help me by suggesting some link or any idea.



Carlos Viseras Ruiz

unread,
Apr 24, 2019, 6:40:10 AM4/24/19
to FatSecret Platform API
I have the same problem how do you resolve the problem?
Reply all
Reply to author
Forward
0 new messages