SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE9 problem with Twitter's user_timeline code

    Is anyone else seeing problems with picking up a Twitter feed and displaying it on their pages in IE9? I'm sure this was working on sites of mine when they were tested in IE9 some time ago.

    Now there are no tweets appearing in IE9 when using http://twitter.com/statuses/user_timeline code and I wonder if Twitter has recently changed their code. It works OK in all other browsers including IE7 and IE8. Here's a link to one of the sites affected ... http://www.elva.com. I've tried some other people's sites in IE9 and the same problem is there, so its not just my code/sites.

    Using IE9 developer tools I can see this error ...
    SEC7112: Script from http://twitter.com/statuses/user_timeline/******.json?callback=twitterCallback2&count=1 was blocked due to mime type mismatch
    Last edited by Mittineague; Aug 27, 2011 at 09:16. Reason: fixing up

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,036
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    Is the JSON feed returning
    PHP Code:
    header("Content-Type: application/json"); 

  3. #3
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,036
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    I checked out two and included in the HTTP headers they send are
    Code:
    Server: hi
    Content-Type: application/json; charset=utf-8
    I'm wondering if "hi" means "high anonymous proxy"?
    They also set cookies.

    The Content-Type header is good, maybe it's a security setting somewhere?

    Off Topic:

    lighting photography photo light

  4. #4
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've checked the IE9 security settings and cookies were being blocked due to the settings. I've now explicitly allowed cookies for this domain and for twitter.com but it doesn't make any difference. No cookie is actually being stored. I suspect that the twitter.com script isn't actually running far enough to even set a cookie. The IE9 Developer Tools (F12) window just displays the SEC7112 originally mentioned above.

  5. #5
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,036
    Mentioned
    187 Post(s)
    Tagged
    2 Thread(s)
    I did some Googling and found https://dev.twitter.com/discussions/1232
    It seems IE9 wants JSON-P to have the Content-Type application/javascript because the callback is a function as opposed to a string

    Off Topic:

    lighting photography photo light

  6. #6
    SitePoint Member
    Join Date
    Sep 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for finding that thread. It didn't come up in my Google searches a day or so ago. Encouraging that a fix is going to be available soon it seems.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •