How to link old Twitter posts to new website - ruby-on-rails

I'm building a new website for a client and they have Twitter posts that link to there old website. The urls are formatted like so: website name/blog post title, however, the new url to those posts are as follows: website name/blogs/blog post title. As far as I know tweets can't be altered, so my question is how do I link these existing tweets to there corresponding blog posts that have the new blog path? How would this be handled? Deleting all the tweets would be very destructive, what is, if any, the way to handle this?

It depends on how many there are - but the simplest answer would be "redirects". Put a redirect page at each of the old URLs forwarding the browser to the new URL.

Related

Using search engine friendly URLs

My website will be using search engine friendly URLs made up from the subject line of postings by members. A subject could be how to create a class at runtime so the URL will be:
www.example.com/topic/how-to-create-a-class-at-runtime
Ok so that gets stored and hopefully spidered and listed in the search engines. The user can edit their posting at any time and they can also change their subject line.
My question is, if they change their subject line, should the old link still be active and a new one added to the database both pointing at the same article or should the link only be with the new subject line? If the latter I would have a lot of dead links from google etc if many users changed their subject line.
Use a server-side redirect to redirect from the old URL(s) to the new URL.
In your example, you should use a 301 redirect ("Moved Permanently").

Post to Reddit via URL

Is it possible to post a link to Reddit via URL?
For example for Facebook you can do
<a href="https://www.facebook.com/sharer/sharer.php?u=http://stackoverflow.com">
Share Stackoverflow on your profile!
</a>
Does Reddit have an equivalent endpoint I can hit to share a URL?
There are several ways to do this, depending on exactly what kind of application you have.
If you're making something interactive, you can take a user to the submit page with a URL and title already filled in. The following URL will open the reddit submit form with a link to this question:
http://www.reddit.com/submit?url=https://stackoverflow.com/questions/24823114/post-to-reddit-via-url&title=Post%20to%20Reddit%20via%20URL
If you just want people to be able to submit your site or blog post to reddit, you can use a reddit button on your page instead.
If you're writing an app or a script where you need to post a URL to reddit, you can use the /api/submit route in the reddit API. If the user that is submitting the link has less than 2 link karma, then a CAPTCHA will probably be given.

How do I display clickable wordpress blog post titles in an UITableView for iOS?

I am working on a iOS application in which I would like users to be able to access a table view list of blog post titles. The blog is self-hosted and runs on the Wordpress platform. The blog is linked to a twitter account so that each time a new post goes live, a new tweet is generated with the post title and the url. I was thinking that I could retrieve the twitter feed and insert the tweets into my table but I don't know if that's the easiest/best way to do it. Does anyone have any ideas?
You might want to setup an RSS to UITableView instead of bringing in the twitter API to do the job for you. If you keep the UITableView dependent on the Twitter API, you are inducing an additional, unwanted level of data dependency. Use RSS and update the UITableViews. You could possibly use this: http://dblog.com.au/iphone-development/rss-reader-part-4-setting-up-the-uitabbar-and-uitableview-with-delegates/ although I'm not sure if this is what you are looking for.

Good 404 in Rails, with search result on moved pages for new links

I am trying to replace lots of pages in my database at once, and lots of pages that are indexed by Google will have new URLs. So in result, old pages will be redirected to a 404 page.
So I need to design a new 404 page, by including a search box in it. Also, I want the 404 page to grab the keywords in the broken URL in the address bar, and show the search result based on the keywords in the broken links, so that user will have an idea where to go next to the new link.
Old URL:
http://abc.com/123-good-books-on-rails
New URL:
http://abc.com/good-books-on-rails
Then when a user comes from search engine, it shows the old URL. The 404 page will do a search on "good books on rails" keywords and return with a list of search result. So the user know the latest url of that link.
How do I implement this? I will be using Friendly ID, Sphinx and Rails 2.3.8.
Thanks.
You are far better off simply generating the appropriate redirects yourself than to expect your users to do anything weird if a Google link fails. This won't be indefinite - Google will eventually reindex you. If you use 301 (permanent) redirects, Google will be smart enough to NOT follow the link when reindexing your site. If you don't want to manually create redirects for hundreds of pages, then you'll need to try to figure out the algorithm for how your old pages map to new pages.

How do I get my Twitter feed to integrate with a blog (with individual comment threads)?

I would like to create a blog where my Twitter updates essentially create blog posts, with a comment thread. If there isn't blog software that does this right now (I did some searching but couldn't find the commenting aspect) what would be the simplest approach and starting blog software to do this?
Potentially an alternate approach to this would be a blog interface that could auto-update my Twitter feed with the title text.
Whatever the solution, I'd like it to be fully automated so that it is roughly no more work than currently updating my Twitter feed using the Twitter web interface. Note: I'm also interested in 'normal' blog posting via the default blog web admin interface.
If you would like to use Wordpress, you can use the Twitter Tools plugin.
"Pull your tweets into your blog and create new tweets on blog posts and from within WordPress."
Each tweet/blog post would automatically have comments enabled.
Good luck man,
Brian Gianforcaro
You could use something like Tumblr or Sweetcron with Disqus comments. You can auto-import your Twitter/Flickr/any RSS feed. You can also post text/audio/video from the site admin. You'll have to manually add Disqus comments, but then each post or Twitter message will have its own threaded comments.

Resources