-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Support Tips for new Twitter site #4548
Comments
Regarding selectors: |
That's really helpful! The other half of the puzzle would be gathering the various metadata associated with the tweet. We currently gather the following pieces of metadata:
Haven't looked in depth, but hoping it's not too hard to gather those once we have the tweet itself. |
New DOM doesn't make things easy. The following gathers most of the data, but the numerical user ID does not appear to be retrievable from the DOM. const getMetaData = tweet => {
const names = tweet.getElementsByTagName("a")[1].textContent.split("@")
const status = tweet.querySelector("a[href*='/status/']")
return {
name: names[0],
screenName: `@${names[1]}`,
userId: "",
tweetId: status.href.match(/\d+/)[0],
tweetTimestamp: status.querySelector('time').dateTime,
tweetText: tweet.querySelector('[lang]').textContent
}
} |
@emerick move this to P1; we need to hotfix this in to current release. |
@mandar-brave It looks like promoted tweets don't contain a timestamp link, which also happens to be where we scrape the tweet ID from. We need the tweet ID in order to quote the tweet when tweeting about our tip (it may be used elsewhere too, but that was the main place I saw it being used). I would suggest for now that we disallow tipping promoted tweets on new Twitter, as I'm not sure we currently have a viable workaround for this. Let me know what you think, however. |
@emerick i am good with getting what we can; we should get a PR out without tipping promoted tweets ATM; leave the issue open to see if we can find a fix for the remain topics. @davidtemkin for his opinion! |
@emerick For |
@GeetaSarvadnya Yes, for technical reasons (basically, we're unable to retrieve the tweet ID for promoted tweets) we don't allow tipping promoted tweets and thus don't show the tip icon for them. |
Verification passed on
Verified passed with
Verification passed on
|
Issue:
It seems Twitter is A/B testing multiple sets of pages for users who are willing to opt in to those. One of those pages is mobile.twitter.com which is the responsive version. Our current solution for Twitter tipping breaks on the new site.
Solve:
Preferably fix prior to release.
Old site works reliably so far.
cc @emerick @NejcZdovc @alexwykoff
The text was updated successfully, but these errors were encountered: