Your SlideShare is downloading. ×
0
Graph API
SDKs & Tools
Introductionhttps://developers.facebook.com/docs/sdks/    SDKs lets you access Graph API and other     JavaScript SDK (Gr...
JavaScript SDK    Access Facebook server API calls from the client     Graph API     REST API     Dialogs  Render XFBM...
Initialization<div id="fb-root"></div><script src="//connect.facebook.net/en_US/all.js"></script><script>    FB.init({    ...
Platform dialogs - FB.ui()    Integrate Facebook UI flow into the    application    Feed Dialog    Add a friend    Autho...
Feed dialogFB.ui(         {            method: feed,            name: Developer Community,            link: https://www.fa...
Feed dialogFB.ui(         {            method: feed,            name: Developer Community,            link: https://www.fa...
Feed dialogFB.ui(         {            method: feed,            name: Developer Community,            link: https://www.fa...
Application requestFB.ui(         {             method: apprequests,             message: Check the Bratislava Facebook Co...
Application requestFB.ui(         {             method: apprequests,             message: Check the Bratislava Facebook Co...
Application requestFB.ui(         {             method: apprequests,             message: Check the Bratislava Facebook Co...
User Authentication    Register to the website using Facebook    or get the permissions for the app        FB.login()    ...
Login userFB.login(        function(response) {            if (response.authResponse) {                console.log(Welcome...
Login userFB.login(        function(response) {            if (response.authResponse) {                console.log(Welcome...
Demohttps://apps.facebook.com/bratislava-developer/
Milan STESKAL@milansteskal      @facebookDevSkfacebook.com/groups/188066214578728/
Upcoming SlideShare
Loading in...5
×

Graph api

1,853

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,853
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
20
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Graph api"

  1. 1. Graph API
  2. 2. SDKs & Tools
  3. 3. 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)
  4. 4. 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
  5. 5. 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>
  6. 6. 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
  7. 7. 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.); } });
  8. 8. 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.); } });
  9. 9. 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.); } });
  10. 10. Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
  11. 11. Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
  12. 12. Application requestFB.ui( { method: apprequests, message: Check the Bratislava Facebook Community meeting demo app }, function(response) { // handle callback console.log(response); });
  13. 13. 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
  14. 14. 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});
  15. 15. 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});
  16. 16. Demohttps://apps.facebook.com/bratislava-developer/
  17. 17. Milan STESKAL@milansteskal @facebookDevSkfacebook.com/groups/188066214578728/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×