javascript - Embed Twitter User Timeline in Webpage -


on website, user enters twitter username when register , timeline embedded on profile page. until now, i've achieved following javascript code:

<script type="text/javascript">      var twitterusername = // read database      new twtr.widget({         version: 2,         type: 'profile',         rpp: 4,         interval: 30000,         width: 'auto',         height: 210,          features: {             scrollbar: true,             loop: false,             live: false,             behavior: 'all'         }     }).render().setuser(twitterusername).start(); </script> 

recently noticed following messages appearing in javascript console

twitter widget: widget being deprecated, , cease functioning soon. https://twitter.com/support/status/307211042121973760

twitter widget: can obtain new, upgraded widget https://twitter.com/settings/widgets/new/user?screen_name=electricpicnic

it seems instead of using widget should use embedded timeline. however, docs seem suggest in order embed timeline in page, need go widgets section of settings page , setup widget each user timeline wish embed. twitter gives code embed timeline in page, code contains attribute data-widget-id="275025608696795138" has different value each user.

obviously approach won't work me, because it's not feasible me setup widget users (present , future) , store data-widget-id each of them. there non-deprecated way can embed timelines, allows me provide twitter username @ runtime?

update

according this post in twitter dev discussion group, functionality not available currently, provided in future version.

twitter deprecating unauthenticated widgets. no longer able use those.

but twitter has api can call, , can generate own custom tweet timeline ui without having use widget. example of ui, see http://tweet.seaofclouds.com/.

but have know can't call api directly javascript, since api has oauth. can call api server-side code (i don't know you're using now, php/ruby/python/java?). news is, oauth open standard , can call api using language. here example of same widget, gets data calling api using php. long term solution.

if twitter timeline essential site - have go api way. must register site twitter, , use oauth user's timeline data, , use data render javascript widget.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -