Updating a Profile Background Image

Set an image for user's profile background.
Signature:
public async Task<User> UpdateAccountBackgroundImageAsync(
    byte[] image, string fileName, string imageType, 
    bool tile, bool use, bool skipStatus)
public async Task<User> UpdateAccountBackgroundImageAsync(
    byte[] image, string fileName, string imageType, 
    bool tile, bool use, bool includeEntities, bool skipStatus)
Parameters/Filters:
Name Purpose Type Required
fileName Image file name string no
image Base64-encoded image byte[] yes
imageType Image file type string no
includeEntities Include Twitter entities bool no
tile Tile image bool no
use Image use bool no
skipStatus Exclude status information bool no


Return Type: User
v3.0 Example:
            byte[] imageBytes = File.ReadAllBytes(@"..\..\Images\200xColor_2.png");

            var user = await twitterCtx.UpdateAccountBackgroundImageAsync(
                imageBytes, "200xColor_2.png", "png", true, false, false);

            if (user != null)
                Console.WriteLine("User Image: " + user.ProfileImageUrl); 
v2.1 Example:
var user = twitterCtx.UpdateAccountBackgroundImage(@"..\..\image\200xColor_2.png",
                                                   /*tile:*/ false, /*use:*/ true);

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

Twitter API: account/update_profile_background_image

Last edited Nov 29, 2013 at 2:13 AM by JoeMayo, version 15