Is there a quick way to pull twitter profile image in PHP or Javascript? I need to get the url of the FULL image (not avatar size). Thanks. Any code sample is good.
The process is simple when using TweetDeck, first select a tweet containing an image, open the image and in the top left corner a small magnifying glass will appear (see below). Clicking the magnifying glass will open Google's Reverse Image Search in a new browser window.
Profile banners allow users to further customize the expressiveness of their profiles. Use POST account/update_profile_banner to upload a profile banner on behalf of a user. Profile banners come in a variety of display-enhanced sizes.
Having a hexagonal Twitter profile picture on your account signifies that you're an NFT investor. The only way to get these hexagonal avatars is by connecting your secure cryptocurrency wallet to your Twitter account. These days, more people understand the concepts behind cryptocurrency than ever before.
Twitter has had a nice simple URL.
https://api.twitter.com/1/users/profile_image/abraham
It has size options like "?size=bigger"
You can read more about it on Little known Twitter and TwitterAPI tips and tricks.
Twitter now has documentation up as GET users/profile_image/:screen_name.
Update: Support for this method has been removed from v1.1 of the API. Recommended practice going forward is GET /users/show and cache profile_image_url
locally in your service/app.
function get_big_profile_image($username, $size = '') {
$api_call = 'http://twitter.com/users/show/'.$username.'.json';
$results = json_decode(file_get_contents($api_call));
return str_replace('_normal', $size, $results->profile_image_url);
}
get_big_profile_image('bobsaget', '_bigger') should return a large avatar: http://a1.twimg.com/profile_images/330305510/n229938150541_9850_bigger.jpg
get_big_profile_image('bobsaget') should return an even larger image: http://a1.twimg.com/profile_images/330305510/n229938150541_9850.jpg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With