views:

103

answers:

1

iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IAAAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1JREFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jqch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0vr4MkhoXe0rZigAAAABJRU5ErkJggg==

The above data is a picture in data:image/png;base64 format. Is it possible to update a twitter profile picture without providing the path to the image (like http://....com) but instead by providing the image data in the format above?

A: 

Having had a quick look at the Twitter Documentation, specifically the section regarding Updating a User's Profile Image, it does not clearly state whether it will, or will not accept a Base64-encoded string for an image.

That being said, I would presume that it would not (feel free to test it and see if it does, but, as a rule, if an API wants a URL as an input, it will only recognise a URL as valid).

You could, of course, create a PHP script on your server, which, using the PHP function imagecreatefromstring()[PHP Docs] and then use that URI as the value for the Twitter API.

Lucanos
actually i want to update my profile picture using YQL or Y! pipes...
Nok Imchen