Help with coding Connect to twitter application


#1

Up front, I am a programmer and can code HTML and PHP, but not Java (next project is to lean Java).
I have successfully implemented the recommended Java code to set a button in my web page to connect to my twitter application.

However, I have the need to refresh the web page as soon as connection is made to change the format of the web page through PHP code.

How do I code a piece of Java code window.location.reload( true ); to be executed as soon as connection is made to my twitter app?
Michael


#2

OK not much feed back here then!

In the mean time I have the appropriate documentation.

T("#login").connectButton({
authComplete: function(user) {
// triggered when auth completed successfully
window.location=“layout.php#buttons”;
},
signOut: function() {
// triggered when user logs out
window.location=“issues.html”;

But this raises two more questions.
How can I delay the refresh by 2 seconds to allow the button to be viewed as connected by the user after connecting, and before re-loading the page? This is not too important, but it would be nice.
I have tried

Thread.sleep(2000);

but it does not work, well I guess because it is not in a Thread.

The next question is:-
when is signOut: function() actioned?

Michael


#3

Still no response. Not a very good discussion group is it!?

So the solution I finally discovered is:-

var t=setTimeout(“refPage()”,2000);

function refPage()
{window.location=“layout.php#buttons”;}

Anyone out there prepared to answer the last question:-

when is signOut: function() actioned?

Michael


#4

I give in this discussion group is useless!