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 9247983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:52:06+00:00 2026-06-18T09:52:06+00:00

The Twitter seach API returns a JSON object, a.o. containing the unique id of

  • 0

The Twitter seach API returns a JSON object, a.o. containing the unique id of a tweet:

[id] => 2.9851634017882E+17
[text] => foobar

I have created a MySQL bigint(20) field in my database to store the id’s. However, when I try to store the id, in the database it only says 2 in (in this instance).

What am I doing wrong?

  • 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-06-18T09:52:06+00:00Added an answer on June 18, 2026 at 9:52 am

    For every id in the call, I would recommend an approach of converting the value to a string before sending it over to PHP.

    I’m doing this with my own webapp and it works great. I faced the exact same issue with the API.

    ex. using jquery with the Twitter API

    $.getJSON('https://api.twitter.com/1.1/search/tweets.json?q=api&callback=?', function(data){
         $.each(data, function() { 
         this.id_str = this.id_str + ""; // cast integer as string to avoid PHP int to float conversion on json_decode
    
    /* ... more API parsing code ... */
    

    also make sure your capturing the id_str value and not the id value. id_str is perferred over id and is less error prone when dealing with larger id’s.

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

Sidebar

Related Questions

Twitter's REST API returns a in_reply_to_status_id value for tweet statuses, yet the Search API
This is part of my JSON file I obtain through the twitter API: text:Scientists
I have a RubyMotion class that reads from Twitter's search API to create Tweet
Using the Twitter Search API I have attempted to download JSON data from a
I'm looking into using the Twitter tweet button API, found: here I have the
I have a script that scrapes the Twitter search API and returns the results
I'm currently looking into the Twitter-API - specifically the daily trends-API ( http://search.twitter.com/trends/current.json ).
I'm building a little app that uses the twitter search api: http://search.twitter.com/search.json?q=funny Now everything
Trends data from Twitter Search API in JSON. Grabbing the file using: $jsonurl =
I'm retrieving tweets trhough the Twitter Search API and keeping them in MySql database.

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.