Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
83 views
in Technique[技术] by (71.8m points)

javascript - Want to shorten links using bitly api with js

So, I am using Zapier.com for my High school project. in which inside the zapier it has a Node js server which provides a async fucntion to runs some codes. I want to shorten urls using javascript code in the code by zapier pathway so that any links provided will get shortened. Inputs have no problem . I get the links and can produce them in the output. but when i use js with bitly api unable to get an output . Errors encountered are : [object OBject] OR undefined.

question from:https://stackoverflow.com/questions/65871297/want-to-shorten-links-using-bitly-api-with-js

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Hello Mikey!

[object Object] is the default value that you get when trying to stringify an object. To debug this I recommend console logging the object, this will show you all the properties that it contains!

undefined means you are trying to access something that is not defined (hence the name), To fix this, once again: try to log the entire object and then navigating yourself from there!

Hope this helped :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...