How to login to facebook using Facebook4j

前端 未结 1 1406
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-06 16:47

I am developing a photo viewer, which is a java desktop application and to integrate it with facebook I am using the Facebook4J library. But I am clueless as to whe

相关标签:
1条回答
  • 2021-02-06 17:29

    You should retrieve an OAuthAppId from facebook. To do this, create an App on Facebook Developers and click "Create new app". Fill in the form, then copy paste the AppId and Appsecret from the page that appears in your code. Example:

    confBuilder.setOAuthAppId("YOUR APPID HERE");
    confBuilder.setOAuthAppSecret("YOUR APPSECRET HERE");
    

    To get the AccessToken, you have to build a login flow as described here

    0 讨论(0)
提交回复
热议问题