public static async Task <PostResult> PostToFeedAsync(this FacebookClient client, string message)
        {
            Dictionary <string, object> messageParameters = new Dictionary <string, object>();

            messageParameters["message"] = message;

            var result = await client.PostTaskAsync("/me/feed", messageParameters) as JsonObject;

            return(FacebookResultMappers.MapToPostResult(result));
        }
Beispiel #2
0
        public async static Task <PostResult> CreateAlbumAsync(this FacebookClient client, string albumName, string albumDescription)
        {
            Dictionary <string, object> albumCreateParameters = new Dictionary <string, object>();

            albumCreateParameters["message"] = albumDescription;
            albumCreateParameters["name"]    = albumName;

            var result = await client.PostTaskAsync("me/albums", albumCreateParameters) as JsonObject;

            return(FacebookResultMappers.MapToPostResult(result));
        }
Beispiel #3
0
        public async static Task <PostResult> PostPhotoToAlbumAsync(this FacebookClient client, string albumId, string photoUrl, string photoCaption)
        {
            var url = string.Format("{0}/photos", albumId);

            Dictionary <string, object> postPhotoParameters = new Dictionary <string, object>();

            postPhotoParameters["url"]     = photoUrl;
            postPhotoParameters["message"] = photoCaption;

            var result = await client.PostTaskAsync(url, postPhotoParameters) as JsonObject;

            return(FacebookResultMappers.MapToPostResult(result));
        }