-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug? #6
Comments
Ok, well, if I understand your code correctly, then I think your code is incorrect. You will need in your app.js (or the window you are calling BirdHouse from) the following: var BH = new BirdHouse({ consumer_key: "this", consumer_secret: "that", callback_url: "http://www.employeechatter.com/callback" }); BH.tweet("This is a test",function(){ Ti.UI.createAlertDialog({title:'Twitter', message:'Your tweet has been posted'}).show(); }); Then in the birdhouse.js file you should have just: if (Ti.Platform.osname=='iphone') { Ti.include('lib/oauth.js'); Ti.include('lib/sha1.js'); } // android will search the current directory for files else { Ti.include('oauth.js'); Ti.include('sha1.js'); } With those changes, does it work now? |
Hi. Thanks for taking the time to reply. I tried what you said but it still doesn't work. No idea what I am doing wrong. As I say the birdhouse demo works with the same credentials. It appears to verify everything but then when I try to send the tweet it no longer has the login details. Following is the debug screen information: |
Ok, this looks like the exact same issue lunica is having on issue #4. If you read the issue ticket, you'll see that I'm at a complete loss. The key issue is being able to reproduce the issue, and I cannot. It's not that the script is "losing" the access token and token secret or anything, If you view the debug output (not just info), you'll see that your access token and token secret are being set and sent in the XHR call. Do you have any thoughts on maybe how I could reproduce the error or perhaps its causes? If it is working with the BirdHouse App, copy the BirdHouse files from it (including the oauth.js and sha1.js files) to the app you are making and see if that changes anything. |
Hi. Sorry for delay in replying. I basically rebuilt my app from scratch and this time the code worked. I then deleted the birdhouse.js file as I was using the debug version and the error returned. I then replaced all the files with the original (including the deleted birdhouse.js file) and everything was working again. So I am not sure if this is a red herring but it looked like it had something to do with birdhouse.js file being also included and not missing. Thanks for your assistance. |
I'm relieved to hear that it is at least working. Yet, you still aren't able to get birdhouse.js working, yes? |
Hi. Not exactly (and I stress this might be a red herring but it's what I did to fix it). I am only referring to the birdhouse_debug.js file in my app (which is fine) but if I remove the birdhouse.js file from the lib folder then this error occurs. If I put the birdhouse.js file back in the lib folder then everything works fine. On 18 May 2011, at 13:34, jpurcell wrote:
|
hmmm... can you perhaps post the error? If birdhouse.js is never included by your app then it should never throw an error (unless it's a compiling error). |
It is the same error details I previously submitted. I completely agree with your summation and it makes no sense to me. But I had the initial error, rebuilt the app and everything was working fine. I then deleted the birdhouse.js file (as I was happy to use the debug version) and the error returned. I copied the birdhouse.js file back and it was working again. It doesn't make sense to me but I thought I'd share my findings with you. Sent from my iPad On 18 May 2011, at 17:37, [email protected] wrote:
|
Alrighty then! Thanks for posting--be sure to let us know if you find anything else out. Cheers! |
Hi. Hope you can help. I have the demo Birdhouse app installed and this works correctly with my Twitter app details. I am simply trying to allow a user to send a tweet when a button is clicked. Below is my code (I have removed the key and secret code) - and this code is using the exact same auth details as the Birdhouse app which is working. However, when I run my app it does not remember that authorisation has already been given nor does it post the Tweet. Any ideas on where I am going wrong?
if (Ti.Platform.osname=='iphone') {
Ti.include('lib/oauth.js');
Ti.include('lib/sha1.js');
Ti.include('lib/birdhouse-debug.js');
}
// android will search the current directory for files
else {
Ti.include('oauth.js');
Ti.include('sha1.js');
Ti.include('birdhouse-debug.js');
}
var BH = new BirdHouse({
consumer_key: "",
consumer_secret: "",
callback_url: "http://www.employeechatter.com/callback"
});
BH.tweet("This is a test",function(){
Ti.UI.createAlertDialog({title:'Twitter', message:'You tweet has been posted'}).show();
});
The text was updated successfully, but these errors were encountered: