How to pass parameters in an url?l am doing the project random quote

How to pass parameters in an url?l am doing the project random quote
0.0 0

#1
$(document).ready(function() {
  getQuote();
  $('#new-quote').on('click', getQuote);
  $('#tweet-quote').on('click', function() {
    console.log("you");
    if(!inIframe()) {
      openURL('https://twitter.com/intent/tweet?hashtags=quotes&related=freecodecamp&text=' + encodeURIComponent('"' + currentQuote + '" ' + currentAuthor));
    }
  });
  $('#tumblr-quote').on('click', function() {
    if(!inIframe()) {
      openURL('https://www.tumblr.com/widgets/share/tool?posttype=quote&tags=quotes,freecodecamp&caption='+encodeURIComponent(currentAuthor)+'&content=' + encodeURIComponent(currentQuote));
    }
  });
});

How do l know the parameter’s names,for example :hashtags,related,text?


#2

Thank you guys in advance .I am new to FFC


#3

Hi @Tangl666666

How do l know the parameter’s names,for example :hashtags,related,text?

Well, every good api has its documentation.
It’s quite simple to find the api docs: just google: <api name> api, ie. twitter api.
If you won’t be able to find the answer after 15 mins, ping me and I’ll pass you the link.


#4

I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.


#5

Oh ,Thank you!I found it


#6

Sorry,I am new to FFC so …