<img src="//www.viralpatel.net/demo/twitter-image.php?user=<TWITTER_USER>" />
Code language: HTML, XML (xml)
In above code, just put the TWITTER_USER name of person whos image you want to display. For example, for me the above URL will be: <img src="//www.viralpatel.net/demo/twitter-image.php?user=virp" />
Code language: HTML, XML (xml)
One of the use of this tool is to display user image of people in your blog/website’s comment section. You can have a textbox where users can enter their twitter username and from this you can display their twitter avatar :) <?php
include("Twitter.class.php");
$twitter = new Twitter();
$username = $_REQUEST["user"];
$json = $twitter->show('json', $username);
$user = json_decode($json);
$image_url = $user->profile_image_url;
header("Location: ".$image_url);
?>
Code language: PHP (php)
First we use cURL to fetch the user details using twitter API. The response that we get is in JSON format. Hence we use PHP JSON method, json_decode() to convert the JSON into PHP object. Java URL Encoder/Decoder Example - In this tutorial we will see how to URL encode/decode…
Show Multiple Examples in OpenAPI - OpenAPI (aka Swagger) Specifications has become a defecto standard…
Local WordPress using Docker - Running a local WordPress development environment is crucial for testing…
1. JWT Token Overview JSON Web Token (JWT) is an open standard defines a compact…
GraphQL Subscription provides a great way of building real-time API. In this tutorial we will…
1. Overview Spring Boot Webflux DynamoDB Integration tests - In this tutorial we will see…
View Comments
dfdf
Cool site, love the info.
Thank you for sharing. Great article!
Excellent work, thank you very much.
Excellent work, Thanx for sharing!
Wowow!!! Cool site.
Thank you very much for this wonderful share.
It's a best way to show Twitter image in blog. Thanks for share:)