This is great. Thanks for figuring this out, it’s helpful.
This is frustrating. Clearly as @puchuu_dev found below, you’re still sending messages back, even with custom Tweet buttons.
With just a little more work on the Twitter API side, it seems like the API could be made to work with custom Tweet buttons.
@jbrios77 For some reason, this does not work for me. It works fine in isolation but as soon as I plug-it-in (verbatim) in my general code, it does not. Any ideas?
thanks…it really helps me…this is what i’ve been searching for…
thank you so much… 
I need to use window.open in order to show our own pop up first, with a disclaimer statement that user has to accept before continue. So the flow is:
- User clicks a custom Tweet button.
- We do open a JS popup with a disclaimer statement.
- User can either click “Cancel” or “Continue”.
In the first case we simply close the popup and do nothing in the second we call window.open to show the tweet share popup.
In our case all these actions are required by US Law and that worked just fine until we get a requirement to store the tweet id after user shared it. At the moment I do not see any way to achieve that. Or any other way to show a disclaimer before to show the third party service window to our users?
Any comments, please?
iMezied
#67
the same situation here, and I can’t find any way to fix this issue
any help ?
still useful. kudos my friend.
would be awesome to get the screen_name, but this would do.
brilliant!
it first didn’t work on ie until i discovered that
"console.log(…);" was causing trouble…
Hi To All…
Here i add just few line with twitter event callback function… Its working for me. My code
if (typeof twttr != ‘undefined’) {
if (window.__twitterIntentHandler==’ ')
twttr.ready(function (twttr) { twttr.events.bind('tweet', function (event) { shareCallbackHandler(shareLink); }); });
window.__twitterIntentHandler = true;
}
}
How can I use twitter’s javascript to open a tweet window? I only see ways to add share buttons.
I need to use my own button, run some custom js when it’s clicked, then build the url that is going to be tweeted with the result of that custom js. After all that I open the tweet window. When they’ve tweeted or closed the window I need to take further action like sending the tweet’s id back to the server.
I would just run the custom js on page load and set the attributes on the twitter created share button, but the process is expensive and isn’t always used.
Thank you!
Do you know how to get the tweet’s id with this method?