Message Boards

Use Facebook Graph API with Liferay DXP7.3

Upender Kashyap, modified 3 Years ago.

Use Facebook Graph API with Liferay DXP7.3

Junior Member Posts: 30 Join Date: 8/12/20 Recent Posts

Hello Everyone,

I have an use case where we want to personalize the user experience in DXP 7.3 using the user information such as gender, age, location etc. The user is logged-in through Facebook Connect. I want to use Facebook graph APIs for fetching mentioned user information. While I am trying to call the graph APIs, I need to exchange the access token. I am not able fetch the access token or code in my custom portlet class. I looked into facebook login liferay code provided here:  https://github.com/liferay/liferay-portal/blob/master/modules/apps/login/login-authentication-facebook-connect-web/src/main/java/com/liferay/login/authentication/facebook/connect/web/internal/struts/FacebookConnectStrutsAction.java https://github.com/liferay/liferay-portal/blob/master/modules/apps/login/login-authentication-facebook-connect-web/src/main/java/com/liferay/login/authentication/facebook/connect/web/internal/struts/FacebookConnectStrutsAction.java

Can we access the token provided at line no. 168 in our custom portlet class. How can we acheive this, if anyone can help?

Thanks and Regards