Posts

Showing posts with the label Facebook

How to retrieve Facebook profile using Apache Oltu

Image
This tutorial shows you the basic of OAuth using Apache Oltu (Formely known as Apache Amber). We have created a Java Web Application that authenticates the user to Facebook via OAuth 2.0 and retreive the protected resources from Facebook. Setup : SSL enabled Tomcat Server as we have deployed our Web Application on tomcat. Click here for instruction on How to enable SSL on Apache Tomcat 7.0 Registered Facebook Application. Check here for instruction on How to register App on Facebook. Download the OltuClientFB Application from the GIT repository. If you are using Maven then add below dependency or download Apache Oltu client jars : <dependency> <groupId>org.apache.oltu.oauth2</groupId> <artifactId>org.apache.oltu.oauth2.client</artifactId> </dependency> Run the Project : Check out the project from the above URL, import into the eclipse and Run as a Server. Navigate your browser to https:...

How to register App on Facebook

Image
Steps to create Apps on Facebook : Login to your Facebook account and then Goto https://developers.facebook.com/ and then click on Apps tab. Check below screenshot : Registration Page Enter the Display Name. This is required.  Enter Namespace. (Optional) Choose a Category and then click on Create App button. After verifying captcha It will show you the App ID and App Secret which is nothing but ClientId and ClientSecret . Check below screenshot : Select “Settings” and then click on “Advance” tab. Scroll down and enter your callback URL in “Valid Oauth redirect URIs” and then click on “Save Changes button to save your apps. Congratulation!!! You have created your Apps on Facebook.