facebook 3 rd  part API
Overview <ul><li>Facebook Introduction </li></ul><ul><li>Facebook API capabilities </li></ul><ul><li>Facebook application ...
Facebook Introduction <ul><li>Facebook - social service enabling people to share and connect </li></ul><ul><li>Facebook al...
Facebook API Capabilities <ul><li>facebook API allows you to access any relevant  information the user exposes to your app...
Facebook Application types <ul><li>There are three main application types Facebook supports: </li></ul><ul><ul><li>Externa...
Facebook Language support <ul><li>Facebook officially supports PHP 4/5 and Java client libraries </li></ul><ul><li>Faceboo...
Facebook & Microsoft  <ul><li>Facebook has a .Net library containing all you need, as a developer, for using Facebook thro...
<ul><li>Developing facebook application </li></ul>
Adding new application <ul><li>Opening a new application </li></ul><ul><li>For external application: In the callback URL y...
Code Review <ul><li>At your website project, Add reference to Facebook.dll and to Facebook.WebControls.dll. </li></ul><ul>...
Code Review (contd.) <ul><li>Now we can use the data from Facebook in our application. </li></ul><ul><li>Let’s first build...
Code Review (contd.) <ul><li>Now we need to insert the data we pulled from Facebook platform into our web page. </li></ul>...
DSP-IP Contact information For Course materials & lecture request contact:  For projects development services contact:  <u...
Upcoming SlideShare
Loading in …5
×

Facebook 3rd Party Api

8,604 views
8,437 views

Published on

How to develop facebook applications

Published in: Technology, Business
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
8,604
On SlideShare
0
From Embeds
0
Number of Embeds
57
Actions
Shares
0
Downloads
204
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Facebook 3rd Party Api

  1. 1. facebook 3 rd part API
  2. 2. Overview <ul><li>Facebook Introduction </li></ul><ul><li>Facebook API capabilities </li></ul><ul><li>Facebook application types </li></ul><ul><li>Facebook language support </li></ul><ul><li>Facebook & Microsoft </li></ul>
  3. 3. Facebook Introduction <ul><li>Facebook - social service enabling people to share and connect </li></ul><ul><li>Facebook allows you to search for your friends co-workers and anyone you know. </li></ul><ul><li>Facebook is an easy to use and manage, web 2.0 application. </li></ul><ul><li>Facebook allows any user to build it’s own applications using the benefits of their social grid. </li></ul><ul><li>More than that, Facebook architecture causes a mass distribution of your applications. </li></ul>
  4. 4. Facebook API Capabilities <ul><li>facebook API allows you to access any relevant information the user exposes to your application. </li></ul><ul><li>facebook gives you access to profiles, friends, photos, groups, and much more. </li></ul><ul><li>FQL - Facebook Query Language </li></ul><ul><li>facebook API allows you to perform queries on their DB by writing queries. FQL queries syntax is similar to SQL queries. </li></ul><ul><li>FBML - Facebook Markup Language - similar to HTML syntax. Provides easily integration with facebook platform. </li></ul>
  5. 5. Facebook Application types <ul><li>There are three main application types Facebook supports: </li></ul><ul><ul><li>External Desktop Application . </li></ul></ul><ul><ul><li>External Web Application. </li></ul></ul><ul><ul><li>Internal Facebook Application. </li></ul></ul><ul><li>These three types of applications allows you, the developer, to bind Facebook data to any application you’re writing. </li></ul>
  6. 6. Facebook Language support <ul><li>Facebook officially supports PHP 4/5 and Java client libraries </li></ul><ul><li>Facebook partnered with Microsoft to support .Net applications </li></ul><ul><li>Facebook API language support includes: </li></ul><ul><ul><li>ActionScript </li></ul></ul><ul><ul><li>Cocoa </li></ul></ul><ul><ul><li>ColdFusion </li></ul></ul><ul><ul><li>Perl </li></ul></ul><ul><ul><li>Python </li></ul></ul><ul><ul><li>Ruby </li></ul></ul>
  7. 7. Facebook & Microsoft <ul><li>Facebook has a .Net library containing all you need, as a developer, for using Facebook through your desktop or web application. </li></ul><ul><li>The .Net library contains Desktop controls, Web controls, Facebook </li></ul><ul><li>Microsoft also supports Facebook with their PopFly application that allows the developer easily build an application. </li></ul>
  8. 8. <ul><li>Developing facebook application </li></ul>
  9. 9. Adding new application <ul><li>Opening a new application </li></ul><ul><li>For external application: In the callback URL you enter the URL of your application. </li></ul><ul><li>For internal application you need to enable the “Can your application be added on Facebook?” selection. </li></ul><ul><li>Fill your application URLs in the added fields. </li></ul><ul><li>After completing the registration you get API key and Secret strings to use in your application. </li></ul>
  10. 10. Code Review <ul><li>At your website project, Add reference to Facebook.dll and to Facebook.WebControls.dll. </li></ul><ul><li>At the .cs code file write the following: </li></ul><ul><li>new protected void Page_Load(object sender, EventArgs e) </li></ul><ul><li>{ </li></ul><ul><li>base.Api = “Your Application key”; //Inform which application to use. </li></ul><ul><li>base.Secret = “Your Application Secret”; //Added encryption for security. </li></ul><ul><li>base.Page_Load(sender, e); //must be called </li></ul><ul><li>if (!IsPostBack) { </li></ul><ul><li> //Use Facebook API to pull data from Facebook. </li></ul><ul><li> Facebook.Entity.User user = this.FBService.GetUserInfo(); </li></ul><ul><li> Collection<Facebook.Entity.User> friends = this.FBService.GetFriends(); </li></ul><ul><li>} </li></ul><ul><li>} </li></ul>
  11. 11. Code Review (contd.) <ul><li>Now we can use the data from Facebook in our application. </li></ul><ul><li>Let’s first build a simple page in ASP.Net </li></ul><ul><li>This page declares two labels that will be rendered in the server-side, and a link to another page. </li></ul><ul><li>Pay attention to the ID attr. of the asp:labels, we will use these IDs now. </li></ul>
  12. 12. Code Review (contd.) <ul><li>Now we need to insert the data we pulled from Facebook platform into our web page. </li></ul><ul><li>lblHelloWorld.Text = &quot;Hello &quot; + user.Name + &quot; you have &quot; + friends.Count + &quot; friends + &quot;...&quot; + this.FBService.SessionKey; </li></ul><ul><li>this.FBService.SetFBML(&quot;Hello &quot; + u.Name + &quot; you have &quot; + f.Count + &quot; friends”); </li></ul><ul><li>//Set FBML method sets an FBML string to the profile page. </li></ul><ul><li>lblDashboard.Text = &quot;<fb:dashboard><fb:action href=&quot;http://apps.facebook.com/aspnetcanvasfbml/default3.aspx&quot;> </li></ul><ul><li>Go to Default3 </li></ul><ul><li></fb:action></fb:dashboard><br/>&quot;; </li></ul><ul><li>//Sets FBML dashboard element to the applcication </li></ul><ul><li>That’s all you need to create an application </li></ul>
  13. 13. DSP-IP Contact information For Course materials & lecture request contact: For projects development services contact: <ul><ul><li>Adi Yakov </li></ul></ul><ul><ul><li>Training and Courses Manager </li></ul></ul><ul><ul><li>[email_address] </li></ul></ul><ul><ul><li>+972-9-8651933 </li></ul></ul>www.dsp-ip.com Mail : [email_address] Phone: +972-9-8850956, Fax : +972-50- 8962910 <ul><ul><li>Alona Ashkenazi </li></ul></ul><ul><li>Technology Management Services : [email_address] +972-9-8850956 </li></ul>

×