Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can We Access Facebook Api Using Postman client

I want to access my full details using facebook api . I am using postman client for this and hit api as

  URL :  graph.facebook.com/v2.2/me
  METHOD : GET
  HEADER PARAMETER :
   AccessToken : djbjd
   AppID : dsdmds
   AppSecret :sdkkd

Now I get response :

STATUS : 400 Bad Request and Response

"error": {
    "message": "An active access token must be used to query information about the current user.",
    "type": "OAuthException",
    "code": 2500,
    "fbtrace_id": "AQt0krgrd2U"
}

}

Can anyone tell me how I can hit facebook api using postman client .

like image 603
Anuj Dhiman Avatar asked Aug 12 '16 06:08

Anuj Dhiman


People also ask

Is Facebook API a REST API?

With the API, users can add social context to their applications by utilizing profile, friend, Page, group, photo, and event data. The API uses RESTful protocol and responses are in JSON format.

Is postman API client?

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.


2 Answers

You only need one GET parameter for this, the access_token parameter. It must be a valid User Token or Page Token.

You can also just try this in the browser directly: https://graph.facebook.com/me?access_token=xxx

like image 66
andyrandy Avatar answered Sep 17 '22 19:09

andyrandy


I've been using Bearer Token to input the access token on Postman Client. The cool thing about it is you can add it to the folder and have every query inside the folder inherit it from the parent.

This lets me focus on the call and use each folder as an environment for calls related to the same object Page, App, Messenger and other tests

like image 20
JorgeO Avatar answered Sep 17 '22 19:09

JorgeO