1 / 1

Abstract

Facebook Applications. Miguel Flores Computer Science, Hartnell College , Salinas, CA 93901 Kate Lockwood, PhD, Computer Science Department. Conclusions

presley
Download Presentation

Abstract

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Facebook Applications Miguel FloresComputer Science, Hartnell College, Salinas, CA 93901 Kate Lockwood, PhD, Computer Science Department Conclusions The project concluded with a partially completed a web application that is able to use the Facebook API. The application is able to authenticate with Facebook and ask the user before reading data marked as private. If the user gives authorization for the application to access personal information, it is displayed in the RailsApp webpage. RailsApp also provides the option to update the Facebook user’s status. Abstract The purpose of this project was to build a web application (named RoR_app) that implements Facebook’s application programming interface (API). It was developed using the Ruby-on-Rails (RoR) framework and following Model-View-Controller (MVC) architectural pattern. A developer account was created on the Facebook site in order to get access to the Facebook API. The application was developed using a special “fb_graph” gem(think plug-in for RoR) that allows the developer to access the Facebook API in order to read or write in Facebook. Private information, “Like” posts in the Timeline, birthday, email, religion, Likes and friends were retrieved using the “fb_graph” gem and displayed and formatted using HTML with Ruby embedded. The project concluded with a partially completed a web application that is able to use the Facebook API. The application is able to authenticate with Facebook and ask the user before reading data marked as private. If the user gives authorization for the application to access personal information, it is displayed in the RailsApp webpage. RailsApp also provides the option to update the Facebook user’s status. Introduction The purpose of this project was to build a web application (named RoR_app) that implements Facebook’s application programming interface (API). It was developed using the Ruby-on-Rails (RoR) framework and following Model-View-Controller (MVC) architectural pattern. A developer account was created on the Facebook site in order to get access to the Facebook API. The application was developed using a special “fb_graph” gem(think plug-in for RoR) that allows the developer to access the Facebook API in order to read or write in Facebook. RoR is a fairly a new web developing framework that was build using Ruby programming language. The MVC keeps the web application organized and easy to manage. Gems are packages that contain code and files that give extra functionality to the framework. Figure 5. Shows some example code of the facebook_controller.rb (right) where we specify what Facebook information we want to retrieve and show. The facebook.yml file (left) contains all the information that is required for the RoR_app to query data from the Facebook. Figure 5. the rails console(right) and the RoR_app being displayed on the web browser (left). Resources http://guides.rubyonrails.org/ https://developers.facebook.com http://ruby.railstutorial.org/ • Materials and methods • Facebook Developer Website • Facebook Graph API • Ruby on Rails (Web Framework) • ‘Fb_graph” (Ruby Gem ) Figure 2. Facebook's developer site is where you register as a developer, register your application and specify Facebook where is the web application is going to be hosted. • Acknowledgments • CSUMB: • Dr. Kate Lockwood • Joe Welch • Leslie Kern • Hartnell College: • Andy Newton • This Internship was funded by the Hartnell College Foundation. Figure 5. these are some of the files that are in the view folder. These files display the RoR_app in html with ruby embedded the framework render the ruby code in order to be displayed properly in the web browser. Figure 3. the web applications that use the FacebookAPI are not hosted in Facebook’s servers. the developer can chose between redirecting the user to another webpage, display it on a canvas on Facebook or create a custom view using Facebook markup language(fbml) Results Private information, “Like” posts in the Timeline, birthday, email, religion, likes and friends was retrieved using the “fb_graph” gem and displayed and formatted using HTML with Ruby embedded. For further information for more information about the Ruby on Rails framework visit: http://rubyonrails.org/documentation Facebook API visit: http://developers.facebook.com/docs/reference/php/facebook-api/ . Figure 1. Show s the relationship between the controller, the view and the model in the MVC architectural pattern. As you can see the controller talks to the view and the model. In the controller is where all the application’s behavior is defined. Figure 4. Ruby on Rails is an open source web framework for the ruby programming language. Rails is a full-stack framework, meaning that it gives the Web developer the full ability to gather information from the web server, talking to or querying the database, and template rendering out of the box.

More Related