Hi, I have gone through twitter integration before and used pretty much the exact same code as below (only difference is now i am adding info to a list as opposed to a table). I am getting a response saying that it could not authenticate me. I am wondering if there is something which I am forgetting? I have set up my app on the twitter developer console as normal.I am usong titanium classic 3.4 sdk. Testing on simulator, iphone 4s and iPhone 6. Code below:
var Codebird = require("ui/handheld/codebird"); var cb = new Codebird(); cb.setConsumerKey('KeyIsRight', 'KeyIsRight'); cb.setToken('KeyIsRight', 'KeyIsRight'); var bearerToken = Ti.App.Properties.getString('TwitterBearerToken', null); var twitterSection = Ti.UI.createListSection({ headerTitle:'Twitter' }); var twitterDataSet = []; function fetchTwitter(){ var rowData=[]; var data = []; if (Titanium.Network.online){ cb.__call( 'statuses_mentionsTimeline', function (reply) { //console.log(reply); if(typeof reply[0]!=='undefined') { for (var i=0;i<10;i++){ twitterDataSet.push( {info: {text: reply[i].text}, es_info: {text: reply[i].user.name}, pic: {image: reply[i].user.profile_image_url}, properties:{height:'60dp'} }); } sections.push(twitterSection); Mylist.setSections(sections); self.add(Mylist); } else { //console.log("Sorry. Twitter is not available"); Mylist.setSections(sections); self.add(My_list); } }, true // this parameter required ); } // From the IF else { alert("Connect to the internet before twitter"); } }