MyBB Community Forums

Full Version: How to get Twitter ID to show on profile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I want to show users Twitter timeline on their profiles but I don't want to use any plugins, I want to show their timelines using their Twitter username so i created a profile field [fid7] for  it and imputed this as the url for the timeline 
<a class="twitter-timeline" href="https://twitter.com/{$userfields[fid7]}"
   data-widget-id="351086695078"
   data-screen-name="Fredzy007" data-show-replies="false"
   data-list-owner-screen-name="{$userfields[fid7]}"
   data-tweet-limit="1">Latest Tweet by @{$userfields[fid7]}</a>
Now I don't know what to use as the twitter ID, seeing as every Twitter account has a unique ID 
Is there a way to get it or there is a code to use to replace the unique Twitter ID, 

Leefish probably knows what am talking about 

My profile http://naijawords.com/User-Frederick
Another user's profile http://naijawords.com/user-jado25

i am sure the reason i didn't get a reply is because it was not clear, Simply put i need a url that can convert a twitter username to USER ID.  i need something like this
this url "https://twitter.com/get_user_id/username/" will prduce the user id i.e "1123blahblah234"
Get your own widget id Smile

Uses template conditionals, this is the code from leefish


<a class="twitter-timeline" href="https://twitter.com/<func htmlspecialchars_uni>{$userfields['fid9']}</func>"
   data-widget-id="YOUR ID"
   data-screen-name="<func htmlspecialchars_uni>{$userfields['fid9']}</func>" data-show-replies="false"
   data-list-owner-screen-name="<func htmlspecialchars_uni>{$userfields['fid9']}</func>"
   data-tweet-limit="1">Latest Tweet by @<func htmlspecialchars_uni>{$userfields['fid9']}</func></a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
thanks it worked