Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3878370
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:36:18+00:00 2026-05-19T22:36:18+00:00

I was using JQuery’s $.getJSON to retrieve a list of tweets and for an

  • 0

I was using JQuery’s $.getJSON to retrieve a list of tweets and for an unknown reason some of the tweet id(s) were being rounded
"id": 34903960418516968, to "id": 34903960418516970,
So instead I tried using $.ajax with dataType: “text”, and then did the conversion to JSON via parseJSON, JSON.parse and eval which did not work.
The only solution that I found was to make the datatype of the ID String instead of Number while the JSON source is still in text format. I surrounded the actual ID with double quotes ” and I used the following regular expression to do that.

data = data.replace(/\"id\": (\d{15,}),/gi, "\"id\": \"$1\",");

ajax call

$.ajax({
         async: true,
         url: tweetsUrl,
         dataType: "text",
         success: getTweetsResult
       });

the getTweetsResult

function getTweetsResult(data, textStatus, xhr){
    //remove trailing ,
    data = data.substring(0, data.lastIndexOf(",]")) + "]";
    //convert tweet.id to string because the eval of JS is rounding up some of the number
    data = data.replace(/\"id\": (\d{15,}),/gi, "\"id\": \"$1\",");
    //console works with Chrome
    //  console.log(data);
    var tweetList = $.parseJSON(data);
    generateTweets("tweets", "tweetGrid", tweetList, 3, tweets);
    applyRollOverGridItems();
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T22:36:18+00:00Added an answer on May 19, 2026 at 10:36 pm

    I remember reading on the twitter blog that the twitter ID data type had changed and that developers had to update their code. If I remember correctly, they now send the ID as a string variable as well as a long (or float, not sure which) variable. Have a look at the response, and get the ID from the string variable. Should solve that issue.

    EDIT: Found the URLS

    http://groups.google.com/group/twitter-development-talk/browse_thread/thread/6a16efa375532182?pli=1

    http://blog.programmableweb.com/2010/10/19/the-twitter-id-shuffle-text-vs-numbers/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using jQuery timepickr: http://archive.plugins.jquery.com/project/jquery-timepickr Having included these files: jquery-1.7.1.min.js jquery-ui-1.8.21.custom.min.js ui.timepickr.js And getting this
Using Jquery TableSorter, I am creating a custom parser to sort elapsed time <td>
using jquery's .post i send do my php code an object that with var_dump
Using Jquery , I have an array result [<a href=><img src=image1></a>,<a href=><img src=image2></a>] if
Using jquery, how can I change the color of these elements to red if
Using jQuery Nearest Element , I would like to select elements in a circular
Using jQuery 1.7.2. Tested with versions as old as 1.5.1. Same result. In FF
Using jQuery, how can I get the selected item's value in a select when
Using jQuery, how can I get the input element that has the caret's (cursor's)
Using Jquery 1.6.4. I'm attempting to use css to give my app a clue

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.