Posts Tagged Facebook
Hacking Social Networks APIs… the MovieIT way
Javascript based Facebook login OAuth 2.0
One of the positive features of OAuth 2.0 is that the OAuth dance occurs only by using HTTP GET method. This code resides in the Auth.htm page. The if structure checks the browser URL to identify the current step and move to the next one. The first step is to access the https://www.facebook.com/dialog/oauth by providing the application id, the redirection URI and the response type (which in our case is of type token). In our case we set the redirection address to again to the Auth.htm file. After the successful redirection from the Facebook page the script makes again a HTTP GET request to the same endpoint by providing the application ID, redirect URL, the response type and the resources that this application will have access to. If everything goes well then Facebook redirects the browser to back to the Auth.htm page by providing a code parameter. The final part of the script extracts this information for the url and passes it to our servlet in order to provide a customized to the user homepage (e.g. his profile image etc.). Read the rest of this entry »
The Implementation (first steps)
This week we spent efforts to implement the basic architecture components. More specifically build an HTML web page for authenticating the user and authorizing our application. The result of this procedure is the provision of an “access token”. This token is passed to our servlet using the HTTP GET method. The servlet application is now able to have access to all features provided by the Facebook Graph API.
As you can see in the following figure, we tested our web application by checking-in some friends in Athens Greece. This feature will be embedded to our application so people to be able to inform their friends about a movie they watched, the place and their comments they have.