Facebook API Tutorials in Java # 2 | Get User Access Token

Azeem's AI Lab · 42K views · 2016 · 6:48

Open on YouTube

Web developmentSoftware (other)tutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it as the tutorial they were following when setting up RestFB and Facebook access tokens, and answerers point to specific moments in it, such as the import step.

Recommended by 1 people across 1 different months, 2016 to 2017.

What it is

A short screencast from Azeem's AI Lab, part 2 of a Facebook API in Java series. It shows how to get a user access token and use it with the RestFB library, working in NetBeans.

What people said

Recommends Norbert · 2017-02 · Stack Overflow · on “RestFB jar added but FacebookClient symbol not found”

You need the import. In Netbeans you can simply click on the red symbol left from the line and select "add import". Please check this in the tutorial video at 2 min and 17 secs: [this video]

Cites Saleh Feek · 2016-03 · Stack Overflow · on “Graph API Explorer > Get User Access Token > always gives "Token Expired"; What's wrong?! & How to overcome?”

A little Update* at the end of the question. It is the very first time I try to use Facebook API. I am following this video tutorial [this video] . I logged in correctly to Facebook and after that I registered to developers.facebook.com [LINK] I followed these steps: Click Tools & Support Under Tools click Graph API Explorer Select Graph API Explorer Select Get User Access Token Select All the options from both User Data Permissions & Extended Permissions Click Get Access Token - After that I click three OKay 's with default settings. I got what is shown in this image: I clicked on refresh many times, and I also tried ALT + T , but it always gives Token Expired . [LINK] Update* I copied the acces

Cites gymcode · 2017-02 · Stack Overflow · on “RestFB jar added but FacebookClient symbol not found”

I have added RestFB .jar in my Netbeans. However, they are still unable to identify the symbol of variable FacebookClient . My code: package fbapi1; public class FBAPI1 { public static void main(String[] args) { String accessToken = "EAACEdEose0cBAHomDOKsugKsxT8XZB5IsIhtd77aA7L18Tpy0DIJNfbhsIjL9EcAOqyxZACOUxk52sw6ihZCZCUsMwBrtACFYQfNSE3fweh3jrYQss2nqGyXkWAhTCrCVZAQXoeE6cqquZC6eRnVcZB08N5YXmBSsEjNPXRndqHjE21U6lxWBwIBIXoNRZCvW"; FacebookClient fbClient = new DefaultFacebookClient(accessToken); } } I downloaded the API from [LINK] Tutorial that I am following: [this video] Screenshots : [LINK] [LINK] [LINK]

Cites Timo Hautamäki · 2017-12 · Stack Overflow · on “Access token gives only id, all other params are empty or null”

I'm new here and I tried to get started with some videos in youtube. I did all exactly like in the video, but netbeans got only my id. Graph api explorer gives me other params too, netbeans doesn't. Some arrays are empty and all other params are null. Here are vids. [LINK] [this video] Thanks for your help!