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 full-size slide

  2. “move fast and break things”
    Mark Zuckerberg

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  6. 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 full-size slide

  7. 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 full-size slide

  8. AUTHENTICATION

    View full-size slide

  9. Server-side version

    View full-size slide

  10. Javascript SDK version

    View full-size slide

  11. SOCIAL PLUGIN

    View full-size slide