I was going through the facebook docs and their they have used curl for making api calls
curl -G \
-d "fields=name" \
-d "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads"
I have heard previously about the curl but never used it before
Now, I am big on axios, and I am thinking that this would be similar to restful api calls.
So to get the data from the given above snippet, I would need to make a get request since in the above snippet it says?
curl -G \
Secondly the given url is
"https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads"
So axios equivalent would be
axios.get("https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads")
and then -d
i am guessing is for data? so my api request should look something like this?
axios.get("https://graph.facebook.com/<API_VERSION>/act_<AD_ACCOUNT_ID>/ads"
,data: {
fields: "something",
access_token:"8e8e8ee08e0e"
}
)
Can someone confirm that what I am doing is correct or not?