How to do a URL Redirect after Tweet is complete?


#1

I just wondering if it’s possible to have a button that will tweet a customized message when clicked then redirect the user to a URL of my choosing after it’s been tweeted.

If I can figure that part out, I can tell for sure that they have tweeted the correct message and log it correctly in my plugin.

Think this is possible?


#2

You can specify a default message using the Tweet Button’s text parameter. We do not support the flow you describe, but you could measure users interaction with your Tweet Button using [node:184]


#3

mm ok. What about as they click the tweet button another php is fired or maybe some custom javascript?


#4

You can use Web Intents JavaScript Events (https://dev.twitter.com/docs/intents/events) to hook client-side JavaScript into the Tweet (and follow) button, so that when the button is clicked, or when the Tweet intent is completed, you can trigger something in your main page.


#5

Thanks got it working. Here is my final code in case others might find it useful.

<?php $tweet_lottery_txt = 'Tweet Text, etc. etc. Retweet/post a link to your tweet @'; ?>
Tweet

#6

I am trying to do this as well. And this code works. BUT, I am also trying to customize the Tweet button. Using an image of my own.

I am using the following code.

Tweet This
with the following javascript

#7

hola quisiera aser lo mismo que esto

pero con Follow Button


#8

Do we have a sign in api for twitter…?

Means i am having my own website and i want user to have a choice either to login through facebook account or twitter account…i got facebook login api…nw i am searching for twitter sign in api…can u help me…


#9

Yes, the sign in with Twitter flow is documented here: https://dev.twitter.com/docs/auth/sign-in-with-twitter


#10

How did you get it to work?


#11

even i did it.thanx a lot.


#12
Link

I am using this code to tweet . But i am facing a problem. When i load the page it gives me error ‘event not defined’ in code twttr.events.bind(‘tweet’, clickEventToAnalytics(event)). Some body help me please.


#13

You may want to wait until the document’s “ready” before binding events with intents – additionally, if you want to take advantage of the event tracking, you should allow widgets.js to take care of the pop-up for you – by handling the pop-up through window.open yourself. you can disrupt your ability to further track the events.


#14

I am using this code for get data from twitter. i hop is helpful

<?php require("twitter/twitteroauth.php"); require 'config/twconfig.php'; session_start(); $twitteroauth = new TwitterOAuth(YOUR_CONSUMER_KEY, YOUR_CONSUMER_SECRET); // Requesting authentication tokens, the parameter is the URL we will be redirected to $request_token = $twitteroauth->getRequestToken('http://yourwebsite.com/getTwitterData.php'); // Saving them into the session $_SESSION['oauth_token'] = $request_token['oauth_token']; $_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret']; // If everything goes well.. if ($twitteroauth->http_code == 200) { // Let's generate the URL and redirect $url = $twitteroauth->getAuthorizeURL($request_token['oauth_token']); header('Location: ' . $url); } else { // It's a bad idea to kill the script, but we've got to know when there's an error. die('Something wrong happened.'); } ?>

#15
twttr.events.bind('tweet', clickEventToAnalytics(event));

yes, it work fine. But I cant get new tweeted ID. please how to get new Tweet ID.
I see at the url return after tweet complete on popup window has Tweet ID.
pls how to get it ?
thanks so much !


#16

I tried your code but in IE, the twttr.events.bind(‘tweet’, function(event) {} is not being fired. Are you experiencing the same? In IE, I am not redirected.


#17

Why does not a simple alert?
por que no funciona un simple alert?

Tweets sobre “#ConVoluntad”


#18

yo lo mismo pero con twitter-timeline osea, no funciona desde el boton twett del box de twitter-timeline, es una mierda estoy recaliente y no hay una puta referencia


#19

Thanks a lot…
can i know do it have auto tweet???


#20

Gx iso q