A simple way is to use the graphical APIs, go there and get and receive a token with the facebook developer account:
Creating a primary user access token
When you get to creating your own application, you need to find out access tokens and how to generate them using Facebook Login, but for now we can quickly get one of them through the Graph API:
Click on the Get Token button in the top right of the Explorer. Choose the option Get User Access Token. In the following dialog don't check any boxes, just click the blue Get Access Token button. You'll see a Facebook Login Dialog, click **OK" here to proceed.
You can use the graphical api explorer as curl, but if you want to try it with real curl, sintaxis looks like this for the latest api v2.8:
curl -i -H 'Authorization: Bearer YOUR_ACCES_TOKEN' -XGET 'https://graph.facebook.com/v2.8/me'
in my case:
toni@MBP-de-Antonio ~ curl -i -H 'Authorization: Bearer MY-ACCES_TOKEN' -XGET 'https://graph.facebook.com/v2.8/me' HTTP/1.1 200 OK x-app-usage: {"call_count":2,"total_cputime":3,"total_time":3} Expires: Sat, 01 Jan 2000 00:00:00 GMT x-fb-trace-id: BnLv25AHTjq facebook-api-version: v2.8 Content-Type: application/json; charset=UTF-8 x-fb-rev: 2929740 Cache-Control: private, no-cache, no-store, must-revalidate Pragma: no-cache ETag: "39875e94193dcd62dcbbf583fc0008c110820a6c" Access-Control-Allow-Origin: * X-FB-Debug: fvO9W8Bfl+BihEy/3aZyzOiMrXOkrbK8q1I3Xk2wYnI7sSujZNC6vQzR4RoTWK7K3Hx6EdzoE2kZ/aWhsXe4OA== Date: Sat, 01 Apr 2017 06:55:52 GMT Connection: keep-alive Content-Length: 61 {"name":"Antonio Juan Querol Giner","id":"10204458008519686"}%
source share