Updating the Profile Banner

Update the user's profile banner.
Signature:
public async Task<User> UpdateProfileBannerAsync(
    byte[] banner, string fileName, string imageType)
public async Task<User> UpdateProfileBannerAsync(
    byte[] banner, string fileName, string imageType, 
    int width, int height, int offsetLeft, int offsetTop)
Parameters/Filters:
Name Purpose Type Required
banner Banner image bytes byte[] yes
fileName Name of banner to send to twitter string yes
fileType Type of file. (e.g. png or jpg) string yes
width Width of banner int no
height Height of banner int no
offsetLeft Pixels from left to begin cropping image int no
offsetTop Pixels from top to begin cropping image int no


Return Type: User
v3.0 Example:
            byte[] fileBytes = File.ReadAllBytes(@"..\..\images\WP_000003.jpg");

            var user = 
                await twitterCtx.UpdateProfileBannerAsync(
                    fileBytes, "WP_000003.jpg", "jpg", 1252, 626, 0, 0);

            if (user != null)
                Console.WriteLine("User Image: " + user.ProfileBannerUrl); 
v2.1 Example:
            byte[] fileBytes = Utilities.GetFileBytes(@"..\..\images\WP_000003.jpg");
            var user = twitterCtx.UpdateProfileBanner(fileBytes, "WP_000003.jpg", "jpg", 1252, 626, 0, 0);

            Console.WriteLine("User Image: " + user.ProfileBannerUrl);

Twitter API: account/update_profile_banner

Last edited Nov 29, 2013 at 3:16 AM by JoeMayo, version 5