Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Facebook Graph API

Facebook Graph API

2012 CCSP

Andrew Liu

May 02, 2012
Tweet

More Decks by Andrew Liu

Other Decks in Programming

Transcript

  1. FACEBOOK API
    Andrew Liu

    View Slide

  2. “move fast and break things”
    Mark Zuckerberg

    View Slide

  3. View Slide

  4. View Slide

  5. GRAPH API

    View Slide

  6. Everything in Facebook has an ID
    JSON as Data Format
    GET https://graph.facebook.com/19292868552

    View Slide

  7. ACCESS TOKEN
    SCOPE
    The KEY for accessing the API.
    What you CAN do with access token.
    user_photos, user_likes...

    View Slide

  8. GRAPH API EXPLORER
    https://developers.facebook.com/tools/explorer

    View Slide

  9. What about “me”?
    GET https://graph.facebook.com/me?access_token=...
    or
    GET https://graph.facebook.com/me/friends?access_token=...
    GET https://graph.facebook.com/me/likes?access_token=...
    ...

    View Slide

  10. Not only GET,
    but POST and DELETE
    POST https://graph.facebook.com/19292868552/comments?
    message=Hello+World&access_token=...
    or
    DELETE https://graph.facebook.com/19292868552/likes?
    access_token=...

    View Slide

  11. AUTHENTICATION

    View Slide

  12. Server-side version

    View Slide

  13. Javascript SDK version

    View Slide

  14. SOCIAL PLUGIN

    View Slide

  15. View Slide

  16. OPEN GRAPH

    View Slide

  17. View Slide

  18. View Slide

  19. View Slide