So, you've learned how to create lots of different types of Graph Object: Posts, Comments, Events, and so on. You've also learnt how to destroy them if need be.
Were you surprised at what you couldn't do with the Graph API?
In the next chapter, we'll go back to examining the Graph, but we'll use a powerful new tool—Facebook Query Language.
Key takeaways:
To publish via HTTP, use a
URLRequest/URLLoader/URLVariables
setup as usual, and include parameters for the new Graph Object in theURLVariables
instance, alongside the access token.The URL to use is https://graph.facebook.com/«id»/«connection». Make sure to use
flash.net.URLRequestMethod.POST
.
To publish via the SDK, call
Facebook.api("«id»/«connection»", «callback», {parameter1:"value1", parameter2:"value2"}, URLRequestMethod.POST)
.Uploading photos requires a
FileReference
. UseFileReference.browse()
to let the user pick an image from their hard drive.To upload via HTTP: Use
FileReference.upload()
rather thanURLLoader.load()
.To upload...