• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Graph api
 

Graph api

on

  • 1,813 views

 

Statistics

Views

Total Views
1,813
Views on SlideShare
1,810
Embed Views
3

Actions

Likes
1
Downloads
18
Comments
0

2 Embeds 3

http://192.168.33.10 2
http://nixe.mosaicdev.eu 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Graph api Graph api Presentation Transcript

    • Graph API
    • SDKs & Tools
    • Introductionhttps://developers.facebook.com/docs/sdks/ SDKs lets you access Graph API and other  JavaScript SDK (Graph API, dialogs)  PHP SDK (Graph API, Login)  iOS SDK (SSO, Graph API, dialogs)  Android SDK (SSO, Graph API, dialogs)  other (ex: c#) Tools  guides and tutorials  debuggers (ex: Graph API Explorer)
    • JavaScript SDK Access Facebook server API calls from the client  Graph API  REST API  Dialogs Render XFBML social plugins Supports OAuth 2.0 App ID is needed to initialize the SDK
    • Initialization<div id="fb-root"></div><script src="//connect.facebook.net/en_US/all.js"></script><script> FB.init({ appId : 178747652203562, status : true, cookie : true, xfbml : true, oauth : true });</script>
    • Platform dialogs - FB.ui() Integrate Facebook UI flow into the application Feed Dialog Add a friend Authorize the application Buy credits Send application request Share a link
    • Feed dialogFB.ui( { method: feed, name: Developer Community, link: https://www.facebook.com/event.php?eid=206539312741159, picture: http://blog.mist.sk/wp-content/uploads/2011/10/FacebookDevSK-thumb.jpg, caption: Facebook Developer Community, description: The first Facebook developer community meeting inBratislava }, function(response) { if (response && response.post_id) { alert(Post was published.); } else { alert(Post was not published.); } });
    • Feed dialogFB.ui( { method: feed, name: Developer Community, link: https://www.facebook.com/event.php?eid=206539312741159, picture: http://blog.mist.sk/wp-content/uploads/2011/10/FacebookDevSK-thumb.jpg, caption: Facebook Developer Community, description: The first Facebook developer community meeting inBratislava }, function(response) { if (response && response.post_id) { alert(Post was published.); } else { alert(Post was not published.); } });
    • Feed dialogFB.ui( { method: feed, name: Developer Community, link: https://www.facebook.com/event.php?eid=206539312741159, picture: http://blog.mist.sk/wp-content/uploads/2011/10/FacebookDevSK-thumb.jpg, caption: Facebook Developer Community, description: The first Facebook developer community meeting inBratislava }, function(response) { if (response && response.post_id) { alert(Post was published.); } else { alert(Post was not published.); } });
    • Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
    • Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
    • Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
    • User Authentication Register to the website using Facebook or get the permissions for the app FB.login() FB.logout()  FB.getLoginStatus()  FB.getAuthResponse() Advantages    sharing logged in user state  registration flow on the website isnt needed  get access to the users social graph
    • Login userFB.login( function(response) { if (response.authResponse) { console.log(Welcome! Fetching your information.... ); FB.api(/me, function(response) { console.log(Good to see you, + response.name + .); }); } else { console.log(User cancelled login or did not fully authorize.); } }, {scope: email});
    • Login userFB.login( function(response) { if (response.authResponse) { console.log(Welcome! Fetching your information.... ); FB.api(/me, function(response) { console.log(Good to see you, + response.name + .); }); } else { console.log(User cancelled login or did not fully authorize.); } }, {scope: email});
    • Demohttps://apps.facebook.com/bratislava-developer/
    • Milan STESKAL@milansteskal @facebookDevSkfacebook.com/groups/188066214578728/