trouble with twitter in iframe!

914 views
Skip to first unread message

dnsant

unread,
May 9, 2009, 8:05:16 AM5/9/09
to Twitter Development Talk
I cannot get my twitter page to appear within an iframe. Is this a
twitter standard or is there something I can do to resolve this? Can
someone please advise me?

Abraham Williams

unread,
May 9, 2009, 1:28:20 PM5/9/09
to twitter-deve...@googlegroups.com
Twitter uses JavaScript to break iframes because of an issue with clickjacking a while ago. This is unlikely to change.
--
Abraham Williams | http://the.hackerconundrum.com
Hacker | http://abrah.am | http://twitter.com/abraham
Web608 | Community Evangelist | http://web608.org
This email is: [ ] blogable [x] ask first [ ] private.
Sent from Madison, WI, United States

Cameron Kaiser

unread,
May 9, 2009, 1:29:39 PM5/9/09
to twitter-deve...@googlegroups.com
> I cannot get my twitter page to appear within an iframe. Is this a
> twitter standard or is there something I can do to resolve this? Can
> someone please advise me?

You cannot place a twitter user page within an <iframe>. This was disabled
for security reasons. If you need something like this, your best bet is to
write a script to query the API and put that in your <iframe>.

--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- 1-GHz Pentium-III + Java + XSLT == 1-MHz 6502. -- Craig Bruce --------------

hjb

unread,
May 10, 2009, 5:41:25 AM5/10/09
to Twitter Development Talk

> You cannot place a twitter user page within an <iframe>. This was disabled
> for security reasons. If you need something like this, your best bet is to
> write a script to query the API and put that in your <iframe>.

In that case you probably wouldn't use an iframe ;-)

Andrew Badera

unread,
May 11, 2009, 2:45:45 AM5/11/09
to twitter-deve...@googlegroups.com
Plenty of integration reasons you might use an iframe for, that have
little or nothing to do with Twitter itself. Maybe you're using and
re-using the same form in many places ... you might just stick it in
an iframe, with that form being responsible for the API calls. Kind of
like a quick app I put together for someone last week, www.twiij.com.
They're using a FormSpring form, which we popped in an iframe for
integration with WordPress without needing a second, local copy of the
form.

Just sayin', you very possibly might make API calls from an iframe.
Just because the circumstance doesn't pop into mind, doesn't mean it's
not valid or even common.

Thanks-
- Andy Badera
- and...@badera.us
- Google me: http://www.google.com/search?q=andrew+badera

Reply all
Reply to author
Forward
0 new messages