Find where a t.co link goes to [closed]
I would stay away from external APIs over which you have no control. That will simply introduce a dependency into your application that is a potential point of failure, and could cost you money to use. CURL can do this quite nicely. Here’s how I did it in PHP: function unshorten_url($url) { $ch = curl_init($url); … Read more
Reply to Tweet with Tweepy – Python
Just posting the solution so no someone else suffers the way I did. Twitter updated the API and added an option named auto_populate_reply_metadata All you need to do is set that to true, and the leave the rest as should be. Here is a sample: api.update_status(status=”your reply”, in_reply_to_status_id = tweetid , auto_populate_reply_metadata=True) Also, the status_id … Read more
Why does Twitter use a hash and exclamation mark in URLs, and how do they rewrite search URLs?
It’s become the de facto standard that Google has established to ensure consistency and make ajax urls crawlable. See http://code.google.com/web/ajaxcrawling/docs/getting-started.html I believe they are using history.pushState. You can do history.back() in the console and it’ll lead you back to the page.
I don’t understand twitter bootstrap span and row
The reason: container is 940px row is 960px with a -20px margin span4 300px with a 20px margin when screen width is <=940px, the -20px from row and the 20px margin from span4 cancel each other out, that’s why the first span4 has no left margin. The ‘twitter bootstrap’ solution: Add bootstrap-responsive.css and when the … Read more
Can one style a custom Tweet button AND utilise the data attributes?
For some reason they won’t let you use the Javascript data attributes with a custom button so you have to add them to the URL in your HTML. So for your example: You would then add &text=your%20text with your text. <a href=”http://twitter.com/share?url=http%3A%2F%2Fdev.twitter.com%2Fpages%2Ftweet-button&text=my%20text%20here” target=”_blank”> The other codes are the same, just add &related= etc. Make sure … Read more
Is there a callback for Twitter’s Tweet Button?
Twitter has Web Intent events for loaded, rendered, resize, tweet, follow, retweet, like, and click. twttr.events.bind( ‘tweet’, function (event) { // Do something there } ); The behavior was changed in the fall of 2015 due to the unreliableness of callbacks happening after an event is complete. They will now be triggered when a user … Read more
How do you include hashtags within Twitter share link text?
It looks like this is the basic setup: https://twitter.com/intent/tweet? url=<url to tweet> text=<text to tweet> hashtags=<comma separated list of hashtags, with no # on them> This would pre-built a tweet of: <text> <url> <hashtags> The above example would be: https://twitter.com/intent/tweet?url=http://www.example.com&text=I+am+eating+branston+pickel+right+now&hashtags=bransonpickel,pickles There used to be a bug with the hashtags parameter… it only showed the first … Read more