- Facebook Graph API Development with Flash
- Michael James Williams
- 282字
- 2021-03-27 00:41:57
Summary
We learned a lot in this chapter about the Graph API: not just what it is, but also how to access it in AS3.
Key things to learn:
- The Graph API is so-called because it represents all of Facebook's data connected in an enormous graph of objects and connections.
- The Graph API has two types of elements: Graph Objects and Graph Lists.
- Graph Objects may have two IDs: a numeric one specified by Facebook, and possibly an alphanumeric one, specified by the Graph Object's owner.
- Graph Objects have connections; connections lead to Graph Lists; Graph Lists contain Graph Objects.
- The format of a Graph URL for retrieving a Graph Object is https://graph.facebook.com/graph_object_id.
- The format of a Graph URL for retrieving a Graph List is https://graph.facebook.com/graph_object_id/connection_id.
- Graph URLs return data in JSON format. This is a text-based format which uses key-value pairs to represent objects containing properties, arrays, and other objects.
- Sometimes, Graph URLs return error messages; these are also given in JSON format.
- We can use the
?metadata=1
parameter in a Graph URL to make it return extra information about the element, like the list of connections leading from a Graph Object. - Metadata is not returned for Graph Objects that are part of a Graph List.
- The JSON representation of a Graph Object can be deserialized to an AS3 object we can use in code using the as3corelib library.
We also discussed how the Graph API is so flexible, because it uses the same basic structure for every type of object in Facebook's database.
But what about those objects that give us an authorization error when we try to get information on them? That's what we'll cover in the next chapter.
推薦閱讀
- GIMP 2.6 cookbook
- Spring Python 1.1
- 對比Excel,輕松學習SQL數據分析
- Oracle SQL Developer 2.1
- 攝影照片修飾完全自學手冊
- AI繪畫:Stable Diffusion從入門到精通
- Photoshop CC從入門到精通(全彩超值版)
- Salesforce CRM: The Definitive Admin Handbook
- IBM WebSphere eXtreme Scale 6
- 3D打印輕松實踐:從材料應用到三維建模
- 中文版3ds Max 2016/VRay效果圖制作技術大全
- Photoshop+CorelDRAW平面設計案例實戰:從入門到精通(視頻自學全彩版)
- After Effects印象 影視高級特效光影篇
- Hello HarmonyOS!:鴻蒙應用開發從入門到精通
- 和秋葉一起學:秒懂Photoshop后期修圖