Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Tweet ID from tweet event

I am using the Twitter web-intents / javascript API, and I'm a bit surprised. What I'd like to do is listen for an event after a tweet occurs. Following their example:

twttr.events.bind('tweet', function(event) {
    // Do something there
});

However, what I'd like to do is store the tweet id, or some other relevant information. If I take a look at the event object, there doesn't appear to be any relevant information in the data attribute.

Is it possible to obtain the tweet ID (or any other details about the tweet) by listening to a tweet event?

like image 817
NT3RP Avatar asked May 31 '12 21:05

NT3RP


People also ask

What is the Tweet ID?

Today, Twitter IDs are unique 64-bit unsigned integers, which are based on time, instead of being sequential. The full ID is composed of a timestamp, a worker number, and a sequence number.

How do I get tweets from Tweet ID in Python?

You can access specific tweets by their id with the statuses/show/:id API route. Most Python Twitter libraries follow the exact same patterns, or offer 'friendly' names for the methods. and the returned dictionary follows the Tweet object definition given by the API.

Is Twitter ID unique?

Essentially, Twitter assigns a unique ID to each person as they join the network. This ID is a number, and started at number 1, and is currently above 300 million. But: that doesn't mean that the current user ID specifies the exact number of users on the network.


1 Answers

Web Intent events exist as a mechanism to trigger functionality in your page, not a data API.

The tweet event gets fired to indicate that a Tweet has happened, but we don't provide identifying information through the event payload: Intents function on your site without a user authorizing you access to their account, and providing a Tweet ID for an anonymous user's action would implicitly provide you with their identity.

like image 58
Abdul Hfuda Avatar answered Oct 23 '22 12:10

Abdul Hfuda