How can I show twitter.com in an iframe (or something similar)?


#1

I’m building a web app that extends the twitter interface in a few ways. The way I would like the workflow to work is for the user to log into my site via OmniAuth and then to show twitter in an iframe on my site. The idea is that I don’t want my users to need to learn a new interface. But, I’ve noticed that twitter.com is not showing up in the iframe and I’ve read that this is purposeful to prevent fishing. Is there any workaround for this? My app already has read and write access to the users account so I have the necessary credentials to prove that I’m not a fishing site. Any help would be appreciated.

Thanks!


#2

Framing the twitter.com site in an IFRAME or otherwise is against the terms of service – by using OAuth to obtain an access token, you should be using the API instead of the site. To initiate the OAuth flow, you can either redirect in the main browser window, or initiate a new window and then use Javascript to detect when the redirection phase has been completed.


#3

Ug. That’s too bad. I was hoping to get a proof of concept built quickly and this was a simple solution. But, there are plenty of ways to accomplish what I’m trying to do.

Thanks,
Andrew


#4

Sorry, one follow up question: can you point me to the relevant section of the TOS. I’ve read through them twice and I can’t find the section on iframes, etc…

Thanks!


#5

This section is the most relevant: “Your Client cannot frame or otherwise reproduce significant portions of the Twitter service. You should display Twitter Content from the Twitter API.”

Essentially, we have an API for a reason – the site is not an API.


#6

Thanks that’s really helpful. I’m definitely not trying to use the site as an API and all tweets from my users will be posted via the API that you provide. Hopefully that keeps me on the right side of the TOS. But, terms like “significant” and “Twitter service” are vague enough that it’s not really possible to know a-priori.


#7

#8