2011年11月12日 星期六

[Facebook] Graph API - Objects

* Some Connection is a kind of Objects.

Format
  • Object
    • Explanation
    • Permissions maybe needed (not list all)
    • URL to get this Object
    • Connections of this Object (URL to get other objects by their connection)

[Main Objects]
  • Application
    • An application registered on Facebook Platform
    • /APPLICATION_ID/accounts, albums, banned, feed, insights, links, payments, picture, posts, reviews, staticresources, statuses, subscriptions, tagged, translations, scores, achievements
  • Page
    • A Facebook Page
    • /PAGE_ID/feed, picture, settings, tagged, links, photos, groups, albums, statuses, videos, notes, events, checkins, admins, blocked, tabs
  • User
    • A user profile.
    • https://graph.facebook.com/me (the current user)
    • /USER_ID/accounts, achievements, activities, albums, apprequests, books, checkins, events, family, feed, friendlists, friendrequests, friends, games, groups, home, inbox, interests, likes, links, movies, music, mutualfriends, notes, notifications, outbox, payments, permissions, photos, picture, pokes, posts, scores, statuses, tagged, television, updates, videos

[Connections]
  • Album
    • A photo album
    • user_photos: 你的相片; friends_photos: 和你分享的相片
    • /User, Application, Page/albums
    • /ALBUMS_ID/photos, likes, comments, picture
  • Photo
    • An individual photo within an album; 所有照片(包含被tag的...)
    • ADD: publish_stream: 替你張貼內容到 Facebook
    • /User, Page, Application, ALBUMS_ID/photos
    • /PHOTO_ID/comments, likes, picture, tags
  • Checkin
    • A checkin made through Facebook Places or the Graph API.
    • user_checkins: 你的打卡動態; 和你分享的打卡動態
    • /User, Page/checkins
    • /CHECKIN_ID/comments, likes
    • Test Result
      • Can't get checkin info that tagged by friend?
  • Comment
    • A Comment on a Graph API object
    • /COMEMENT_ID/likes
  • Event
    • A Facebook event
    • user_events: 你的活動; rsvp_event: Manage your events; friends_events: 和你分享的活動
    • /User, Application, Page/events
    • /EVENT_ID/feed, noreply, invited, attending, maybe, declined, picture
      • feed can CREATE/DELETE links, posts, statuses
    • Test Result
      • 僅取得 User 發起的、不確定的與確定參加的?
  • FriendList
    • A Facebook friend list; 取得朋友群組清單
    • read_friendlists: Access my custom friend lists
    • /User/friendlists
    • /FRIENDLIST_ID/members
      • manage_friendlists : Manage your custom friend lists
  • Group
    • A Facebook group
    • user_groups
    • /User, Page/groups
    • /GROUP_ID/feed, members, picture, docs
    • Message
      • A message in a thread
      • read_mailbox: Access messages in your inbox
      • /User/inbox
    • Note
      • A Facebook Note
      • user_notes, friends_notes
      • /User/notes
      • /NOTE_ID/comments, likes
    • Question
      • A question asked by a user, as represented in the Graph API.
      • user_questions, friends_questions
      • /Use/questions
      • /QUESTION_ID/options
    • QuestionOption
      • An option allowed as an answer to a question.
      • /Question/options
      • /QUESTIONOPTION_ID/votes
    • Review
      • A review for an application
      • /Application/reviews
    • Subscription
      • A subscription to an application to get real-time updates for an Graph object type.
      • /Application/subscriptions
    • Thread
      • A message thread
      • /User/threads
      • Test Error
        • (#298) You must be a developer of the application
    • Video
      • An individual video
      • /Use, Application, Page/videos
      • /VIDEO_ID/likes, comments, picture

    - Wall-related
    • Link
      • A shared link
      • read_stream: Access posts in your News Feed
      • /User, Application, Page/links
      • /LINK_ID/comments, likes
    • Post
      • An individual entry in a profile's feed
      • /User, Application, Page, Group/posts
      • /POST_ID/comments, likes
    • Status message
      • A status message on a user's wall (UPDATE)
      • User 在 wall 發表的純文字敘述。
      • /User/statuses
      • /STATUS_ID/comments, likes

    - Game-related
    • Achievement(Instance)
      • Instance for an achievement for a user.

    [Others]
    • Domain
      • A website domain within the Graph API
    • Insights
      • Statistics about applications, pages, or domain.
      • /User, Application, Domain/insights

    Note
    like and feed are not an Object


    By the way
    HTTP 302: 暫時轉移(Temporarily Moved)
    物件已移動,並告知移動過去的網址。針對表單架構驗證,這通常表示為「物件已移動」。 要求的資源暫時存於不同的 URI 底下。由於重新導向可能偶而改變,用戶端應繼續使用要求 URI 來執行未來的要求。 除非以 Cache-Control 或 Expires 標頭欄位表示,此回應才能夠快取。


    * Reference
    - Graph API
    - Graph API Explorer

    沒有留言:

    張貼留言