Getting Facebook Access Token for JAVA applications

    When for the first time i used facebook API in my java application using the  library restFb i faced real trouble with the access token .For that i browsed a lot to get the token at last i was able.So to make it easy here are the steps to get the access token that is valid for 2 months.

Step:1
   First of all create a facebook application and goto the application page.goto tools and click on APIExplorer   in the menu as shown below select your application…

 click on get accesstoken..

 
on clicking debug it will show you that it is valid for 1 hour only..Note the access token as use the URL below with the noted token…
   graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token
&client_id=APP__ID&client_secret=APPP__SECRET&fb_exchange_token=CURRENT_TOKEN

So in return u will return with an token that is valid for 2 months..

Thanks………..

Catch Me On

Bikash Panda

Blogger / Embedded System Developer at WGLabz
A techie, tinkerer and tech lover, who loves to blog and feels everyone can learn tech provided they have the right attitude towards learning and passion. By profession, I am an IOT developer working in Smart Home/ Smart Grid domain.
Bikash Panda
Catch Me On

Latest posts by Bikash Panda (see all)

Related posts