Related
Does somebody knows why Twitter API delivers different information for the same status using different methods?
I'm working on a Twitter bot to collect transit events. I'm facing some issues with the information delivered by the API, due to I've identified that depending on the method, the API can deliver different result for the same Tweet/status.
Here an example for the Tweet ID:1531517617562951682 using api.get_status, the status doesn't have the attributes extended_tweet and timestamp_ms.
Thanks in advance.
{
"created_at": "Tue May 31 06:07:08 +0000 2022",
"id": 1531517617562951682,
"id_str": "**1531517617562951682**",
"text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chic\u2026 (**removed_url)",
**"truncated": true**,
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"symbols": [],
"user_mentions": [],
"urls": [
{
"url": **removed_url_short,
"expanded_url": ,
"display_url": ,
"indices": [
117,
140
]
}
]
},
"source": "Twitter Web App",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 166594238,
"id_str": "166594238",
"name": "OVIAL_SSCCDMX",
"screen_name": "OVIALCDMX",
"location": "Liverpool #136, Col. Ju\u00e1rez",
"description": "Centro de Orientaci\u00f3n Vial de la Secretar\u00eda de Seguridad Ciudadana de la Ciudad de M\u00e9xico.",
"url":,
"entities": {
"url": {
"urls": [
{
"url": ,
"expanded_url": ,
"display_url": "ssc.cdmx.gob.mx",
"indices": [
0,
23
]
}
]
},
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1866313,
"friends_count": 125,
"listed_count": 4188,
"created_at": "Wed Jul 14 15:00:43 +0000 2010",
"favourites_count": 2748,
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"verified": true,
"statuses_count": 1110675,
"lang": null,
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "000000",
"profile_background_image_url":
"profile_background_image_url_https": ,
"profile_background_tile": false,
"profile_image_url": ,
"profile_image_url_https": ,
"profile_banner_url": ,
"profile_link_color": "BC8F8F",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"has_extended_profile": false,
"default_profile": false,
"default_profile_image": false,
"following": false,
"follow_request_sent": false,
"notifications": false,
"translator_type": "none",
"withheld_in_countries": []
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 0,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"possibly_sensitive_appealable": false,
"lang": "es"
}
Same status collected with a stream.Attributes extended_tweet and timestamp are present on the status:
{
"created_at": "Tue May 31 06:07:08 +0000 2022",
"id": 1531517617562951682,
"id_str": "1531517617562951682",
"text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chic\u2026 (**removed url)",
"display_text_range": [
0,
140
],
"source": "Twitter Web App",
"truncated": true,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 166594238,
"id_str": "166594238",
"name": "OVIAL_SSCCDMX",
"screen_name": "OVIALCDMX",
"location": "Liverpool #136, Col. Ju\u00e1rez",
"url": "http://ssc.cdmx.gob.mx",
"description": "Centro de Orientaci\u00f3n Vial de la Secretar\u00eda de Seguridad Ciudadana de la Ciudad de M\u00e9xico.",
"translator_type": "none",
"protected": false,
"verified": true,
"followers_count": 1866203,
"friends_count": 125,
"listed_count": 4188,
"favourites_count": 2748,
"statuses_count": 1110325,
"created_at": "Wed Jul 14 15:00:43 +0000 2010",
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"lang": null,
"contributors_enabled": false,
"is_translator": false,
"profile_background_color": "000000",
"profile_background_image_url": ,
"profile_background_image_url_https": ,
"profile_background_tile": false,
"profile_link_color": "BC8F8F",
"profile_sidebar_border_color": "000000",
"profile_sidebar_fill_color": "000000",
"profile_text_color": "000000",
"profile_use_background_image": false,
"profile_image_url": ,
"profile_image_url_https": ,
"profile_banner_url": ,
"default_profile": false,
"default_profile_image": false,
"following": null,
"follow_request_sent": null,
"notifications": null,
"withheld_in_countries": []
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"extended_tweet": {
"full_text": "01:07 #Precauci\u00f3nVial | Por percance en Av. Ing. Eduardo Molina a la altura de Av. Talism\u00e1n, col. San Pedro el Chico, servicios de emergencia acuden al lugar. (**removed url)",
"display_text_range": [
0,
158
],
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"urls": [],
"user_mentions": [],
"symbols": [],
"media": [
{
"id": 1531517217703092224,
"id_str": "1531517217703092224",
"indices": [
159,
182
],
"additional_media_info": {
"monetizable": false
},
"media_url": ,
"media_url_https": ,
"url":,
"display_url": "pic.twitter.com/q3seKvyPIM",
"expanded_url": ,
"type": "video",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 4003,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": ""
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url":
}
]
},
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 640,
"h": 360,
"resize": "fit"
},
"medium": {
"w": 640,
"h": 360,
"resize": "fit"
},
"small": {
"w": 640,
"h": 360,
"resize": "fit"
}
}
}
]
},
"extended_entities": {
"media": [
{
"id": 1531517217703092224,
"id_str": "1531517217703092224",
"indices": [
159,
182
],
"additional_media_info": {
"monetizable": false
},
"media_url": ,
"media_url_https": ,
"url": ,
"display_url": ,
"expanded_url": ,
"type": "video",
"video_info": {
"aspect_ratio": [
16,
9
],
"duration_millis": 4003,
"variants": [
{
"content_type": "application/x-mpegURL",
"url": "
},
{
"bitrate": 832000,
"content_type": "video/mp4",
"url": "
},
{
"bitrate": 256000,
"content_type": "video/mp4",
"url": ""
}
]
},
"sizes": {
"thumb": {
"w": 150,
"h": 150,
"resize": "crop"
},
"large": {
"w": 640,
"h": 360,
"resize": "fit"
},
"medium": {
"w": 640,
"h": 360,
"resize": "fit"
},
"small": {
"w": 640,
"h": 360,
"resize": "fit"
}
}
}
]
}
},
"quote_count": 0,
"reply_count": 0,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [
{
"text": "Precauci\u00f3nVial",
"indices": [
6,
21
]
}
],
"urls": [
{
"url": ,
"expanded_url": ,
"display_url": "twitter.com/i/web/status/1\u2026",
"indices": [
117,
140
]
}
],
"user_mentions": [],
"symbols": []
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"filter_level": "low",
"lang": "es",
"**timestamp_ms**": "1653977228905"
}
For v1.1, the extended Tweet information is available by default in the streaming API, but for the REST endpoints, you need to add the tweet_mode=extended parameter to your request to retrieve the full text.
In V2, there is no longer a concept of extended (beyond 140 characters) Tweets. All Tweets are natively up to 280 characters as standard.
My ruby on rails app is supposed to do some things whenever a product is deleted. According to Shopify's website here the response to products/delete is supposed to be a JSON object with information such as the product_id associated with the product that was deleted:
{
"id": 788032119674292922,
"title": "Example T-Shirt",
"body_html": null,
"vendor": "Acme",
"product_type": "Shirts",
"created_at": null,
"handle": "example-t-shirt",
"updated_at": "2021-07-01T14:08:43-04:00",
"published_at": "2021-07-01T14:08:43-04:00",
"template_suffix": null,
"published_scope": "web",
"tags": "example, mens, t-shirt",
"admin_graphql_api_id": "gid:\/\/shopify\/Product\/788032119674292922",
"variants": [
{
"id": 642667041472713922,
"product_id": 788032119674292922,
"title": "",
"price": "19.99",
"sku": "example-shirt-s",
"position": 0,
"inventory_policy": "deny",
"compare_at_price": "24.99",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "Small",
"option2": null,
"option3": null,
"created_at": null,
"updated_at": null,
"taxable": true,
"barcode": null,
"grams": 200,
"image_id": null,
"weight": 200.0,
"weight_unit": "g",
"inventory_item_id": null,
"inventory_quantity": 75,
"old_inventory_quantity": 75,
"requires_shipping": true,
"admin_graphql_api_id": "gid:\/\/shopify\/ProductVariant\/642667041472713922"
},
{
"id": 757650484644203962,
"product_id": 788032119674292922,
"title": "",
"price": "19.99",
"sku": "example-shirt-m",
"position": 0,
"inventory_policy": "deny",
"compare_at_price": "24.99",
"fulfillment_service": "manual",
"inventory_management": "shopify",
"option1": "Medium",
"option2": null,
"option3": null,
"created_at": null,
"updated_at": null,
"taxable": true,
"barcode": null,
"grams": 200,
"image_id": null,
"weight": 200.0,
"weight_unit": "g",
"inventory_item_id": null,
"inventory_quantity": 50,
"old_inventory_quantity": 50,
"requires_shipping": true,
"admin_graphql_api_id": "gid:\/\/shopify\/ProductVariant\/757650484644203962"
}
],
"options": [
{
"id": 527050010214937811,
"product_id": 788032119674292922,
"name": "Title",
"position": 1,
"values": [
"Small",
"Medium"
]
}
],
"images": [
{
"id": 539438707724640965,
"product_id": 788032119674292922,
"position": 0,
"created_at": null,
"updated_at": null,
"alt": null,
"width": 323,
"height": 434,
"src": "\/\/cdn.shopify.com\/shopifycloud\/shopify\/assets\/shopify_shirt-39bb555874ecaeed0a1170417d58bbcf792f7ceb56acfe758384f788710ba635.png",
"variant_ids": [
],
"admin_graphql_api_id": "gid:\/\/shopify\/ProductImage\/539438707724640965"
}
],
"image": null
}
However, whenever I go to test it by actually deleting a product in the Shopify Admin interface, I'm only getting the id in my response. Anybody know why this is happening? My setup for the other webhooks is the exact same and I'm not having any other issues.
Seems like this is an open issue on the shopify_api gem for version 2021-01. I don't think you are doing anything wrong. It looks like nobody has responded in a while to the issue, you might want to try to upgrade to another version to see if they fixed it in any of the newer versions.
EDIT: According to a post from 3/2017 the expected behaviour from deleted endpoints is to only return the ID of the resource that was deleted. This could be why the issue on Github is being ignored.
I am trying to trigger a Jenkins build and wait until it has completed.
When I start Jenkins via its REST API, I get a resonse with a URL like http://JENKINS_URL:8080/queue/item/36285/.
When I try to access it, I always the get the 404 error. My test builds are rather short therefore it is possible that they are finished before I exit the debugger.
Question: Is it guaranteed that if a URL like http://JENKINS_URL:8080/queue/item/36285/ results in a 404 response, then the corresponding Jenkins build is finished? That is, can I use this URL to find out whether or not it is finished (as long as the URL returns a status code not equal to 404, the build is running)?
The /queue/item/ give you items in queue, that waiting to start and 404 means item not in the queue, can be canceled or in execution. Job execution can be in running, finished or canceled statuses.
You can use queueId (36285 in your example), get job details and get build status for the particular queueId. In the response for the request below is job details with builds. You can find build you need by queueId in builds and get building(boolean) and result status:
JENKINS_URL+"/job/"+ artifactToBuild +"/api/json?depth=1'
Response example for JENKINS_URL+"/job/"+ artifactToBuild +"/api/json?depth=1':
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowJob",
"actions": [],
"description": "",
"displayName": "my_job_name",
"displayNameOrNull": null,
"fullDisplayName": "my_job_name",
"fullName": "my_job_name",
"name": "my_job_name",
"url": "http://localhost:8080/job/my_job_name/",
"buildable": true,
"builds": [
{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#1",
"duration": 1651,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #1",
"id": "1",
"keepLog": false,
"number": 1,
"queueId": 103,
"result": "SUCCESS",
"timestamp": 1580946018635,
"url": "http://localhost:8080/job/my_job_name/1/",
"changeSets": [],
"culprits": [],
"nextBuild": {
"number": 2,
"url": "http://localhost:8080/job/my_job_name/2/"
},
"previousBuild": null
}
],
"color": "aborted",
"firstBuild": {},
"healthReport": [
{
"description": "Build stability: No recent builds failed.",
"iconClassName": "icon-health-80plus",
"iconUrl": "health-80plus.png",
"score": 100
}
],
"inQueue": false,
"keepDependencies": false,
"lastBuild": {
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#10",
"duration": 1238044,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #10",
"id": "10",
"keepLog": false,
"number": 10,
"queueId": 587,
"result": "ABORTED",
"timestamp": 1581534463735,
"url": "http://localhost:8080/job/my_job_name/10/",
"changeSets": [],
"culprits": [],
"nextBuild": null,
"previousBuild": {
"number": 9,
"url": "http://localhost:8080/job/my_job_name/9/"
}
},
"lastCompletedBuild": {
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#10",
"duration": 1238044,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #10",
"id": "10",
"keepLog": false,
"number": 10,
"queueId": 587,
"result": "ABORTED",
"timestamp": 1581534463735,
"url": "http://localhost:8080/job/my_job_name/10/",
"changeSets": [],
"culprits": [],
"nextBuild": null,
"previousBuild": {
"number": 9,
"url": "http://localhost:8080/job/my_job_name/9/"
}
},
"lastFailedBuild": null,
"lastStableBuild": {
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#2",
"duration": 1671,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #2",
"id": "2",
"keepLog": false,
"number": 2,
"queueId": 105,
"result": "SUCCESS",
"timestamp": 1580946027378,
"url": "http://localhost:8080/job/my_job_name/2/",
"changeSets": [],
"culprits": [],
"nextBuild": {
"number": 3,
"url": "http://localhost:8080/job/my_job_name/3/"
},
"previousBuild": {
"number": 1,
"url": "http://localhost:8080/job/my_job_name/1/"
}
},
"lastSuccessfulBuild": {
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#2",
"duration": 1671,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #2",
"id": "2",
"keepLog": false,
"number": 2,
"queueId": 105,
"result": "SUCCESS",
"timestamp": 1580946027378,
"url": "http://localhost:8080/job/my_job_name/2/",
"changeSets": [],
"culprits": [],
"nextBuild": {
"number": 3,
"url": "http://localhost:8080/job/my_job_name/3/"
},
"previousBuild": {
"number": 1,
"url": "http://localhost:8080/job/my_job_name/1/"
}
},
"lastUnstableBuild": null,
"lastUnsuccessfulBuild": {
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"actions": [],
"artifacts": [],
"building": false,
"description": null,
"displayName": "#10",
"duration": 1238044,
"estimatedDuration": 1671,
"executor": null,
"fullDisplayName": "my_job_name #10",
"id": "10",
"keepLog": false,
"number": 10,
"queueId": 587,
"result": "ABORTED",
"timestamp": 1581534463735,
"url": "http://localhost:8080/job/my_job_name/10/",
"changeSets": [],
"culprits": [],
"nextBuild": null,
"previousBuild": {
"number": 9,
"url": "http://localhost:8080/job/my_job_name/9/"
}
},
"nextBuildNumber": 11,
"property": [
{
"_class": "hudson.plugins.jira.JiraProjectProperty"
},
{
"_class": "org.jenkinsci.plugins.workflow.job.properties.DisableConcurrentBuildsJobProperty"
}
],
"queueItem": null,
"concurrentBuild": false,
"resumeBlocked": false
}
Make a POST request to /jenkins/job/YOURJOBNAME/build. The response
contains a location header with the queue id.
Every X seconds, make a GET request to
/jenkins/job/YOURJOBNAME/api/json?tree=builds[building,number,result,queueId].
The response contains an array of builds for the specified job. Here
you can filter a build by the queueId, and check its status.
The build object can give you a lot of info, but the most important is the number. The number is the id of the build, which you can use later to reference it.
(Just an example) - Download all build artifacts:
/jenkins/job/YOURJOBNAME/THEBUILDNUMBER/artifact/*zip*/artifacts.zip
I wish to extract value for External URL present in the Tweet. Plus the generated Thumbnail of that URL.
Example Tweet:
http://prntscr.com/ogdqey
https://twitter.com/JarirBookstore/status/1151506848387870720
Output from Twitter statuses/user_timeline API -
{
"created_at": "Wed Jul 17 15:00:01 +0000 2019",
"id": 1151506848387870720,
"id_str": "1151506848387870720",
"full_text": "عروض #صيف_هواوي على أجهزة التابلت والميت بوك المختلفة \nالعرض ساري الى 21 يوليو",
"truncated": false,
"display_text_range": [
0,
78
],
"entities": {
"hashtags": [
{
"text": "صيف_هواوي",
"indices": [
5,
15
]
}
],
"symbols": [],
"user_mentions": [],
"urls": []
},
"source": "<a href=\"https:\/\/ads-api.twitter.com\" rel=\"nofollow\">Twitter Ads Composer<\/a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 281376243,
"id_str": "281376243"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 0,
"favorite_count": 3,
"favorited": false,
"retweeted": false,
"lang": "ar"
},
URL entity is a blank array. If the link is not present in the Tweet's text itself, API doesn't return it in the URL entity. I've tried with and without tweet_mode=extended
Surprisingly, Twitter does return URL for few such Tweets. One example is below.
https://twitter.com/BillGates/status/1150605518291001345
API Response:
{
"created_at": "Mon Jul 15 03:18:27 +0000 2019",
"id": 1150605518291001345,
"id_str": "1150605518291001345",
"full_text": "I recently wrote about how people with tech skills can find fascinating problems to work on in global health and development. I was excited to come across this #techreview article about African machine learning researchers who are already doing just that. https:\/\/t.co\/3e1d2QvvH4",
"truncated": false,
"display_text_range": [
0,
279
],
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [
{
"screen_name": "techreview",
"name": "MIT Technology Review",
"id": 15808647,
"id_str": "15808647",
"indices": [
160,
171
]
}
],
"urls": [
{
"url": "https:\/\/t.co\/3e1d2QvvH4",
"expanded_url": "https:\/\/b-gat.es\/2xMsbdh",
"display_url": "b-gat.es\/2xMsbdh",
"indices": [
256,
279
]
}
]
},
"source": "<a href=\"https:\/\/www.sprinklr.com\" rel=\"nofollow\">Sprinklr<\/a>",
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"user": {
"id": 50393960,
"id_str": "50393960"
},
"geo": null,
"coordinates": null,
"place": null,
"contributors": null,
"is_quote_status": false,
"retweet_count": 1320,
"favorite_count": 6719,
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
Why the response is random? It does return URL for Bill Gates' Tweet but not for the one mentioned earlier in my question.
How can I have both External URL and the Thumbnail displayed by Twitter?
My final API call -
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=jarirbookstore&count=100&exclude_replies=true&trim_user=true&include_rts=false&tweet_mode=extended
The first of the two examples you provide is posted by the Twitter Ads platform, so the attached card is not part of the Tweet. There is no way to get that via the API. In the second case, the URL is part of the Tweet text, so it is also part of the URL entities object.
With twitter api named GET friends/list, https://api.twitter.com/1.1/friends/list.json i could get details of every user i am following. What i need is some particular data, 'geo' and 'coordinates' to be specific. There do exist a parameter named 'skip_status=true' to skip the status. But please let me know if either 'geo and coordinates' or 'status' alone could be fetched.
"users": [
{
"id": 3233xxxxxx,
"id_str": "3233428303",
"name": "Mars",
"screen_name": "Mars9411",
"location": "",
"description": "",
"url": null,
"entities": {
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1,
"friends_count": 0,
"listed_count": 0,
"created_at": "Tue Jun 02 09:58:03 +0000 2015",
"favourites_count": 0,
"utc_offset": null,
"time_zone": null,
"geo_enabled": true,
"verified": false,
"statuses_count": 9,
"lang": "en",
"status": {
"created_at": "Tue Oct 27 12:31:11 +0000 2015",
"id": 6589842841878xxxx,
"id_str": "65898428418781xxxx",
"text": "Hey, Download the app in your phone and you can have an Emergency Contact for FREE. It's Great.\nhttps://t.co/kEZg",
"source": "iOS",
"truncated": false,
"in_reply_to_status_id": null,
"in_reply_to_status_id_str": null,
"in_reply_to_user_id": null,
"in_reply_to_user_id_str": null,
"in_reply_to_screen_name": null,
"geo": {
"type": "Point",
"coordinates": [
28.612486,
77.377425
]
},
"coordinates": {
"type": "Point",
"coordinates": [
77.377425,
28.612486
]
},
"place": {
"id": "2e6064382c71b343",
"url": "https://api.twitter.com/1.1/geo/id/2e606438.json",
"place_type": "city",
"name": "Noida",
"full_name": "Noida, Uttar Pradesh",
"country_code": "IN",
"country": "India",
"contained_within": [],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
77.302126,
28.4439811
],
[
77.6953257,
28.4439811
],
[
77.6953257,
28.6471308
],
[
77.302126,
28.6471308
]
]
]
},
"attributes": {}
},
"contributors": null,
"retweet_count": 0,
"favorite_count": 0,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [],
"urls": [
{
"url": "https://t.co/kEZ",
"expanded_url": "http://www.sav.net/apps",
"display_url": "sav.net/apps",
"indices": [
101,
124
]
}
]
},
"favorited": false,
"retweeted": false,
"possibly_sensitive": false,
"lang": "en"
},
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://abs.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
"profile_image_url_https": "https://abs.twimg.com/sticky/default_profile_images/default_profile_0_normal.png",
"profile_link_color": "0084B4",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": true,
"following": true,
"follow_request_sent": false,
"notifications": false,
"muting": false,
"blocking": false,
"blocked_by": false
},
{
"id": 741xxxxxx,
"id_str": "741xxxxxx",
"name": "Food",
"screen_name": "food",
"location": "Fort, IN",
"description": "Locally xxxxx",
"url": "http://t.co",
"entities": {
"url": {
"urls": [
{
"url": "http://t.co",
"expanded_url": "http://Food.com",
"display_url": "food.com",
"indices": [
0,
22
]
}
]
},
"description": {
"urls": []
}
},
"protected": false,
"followers_count": 1976,
"friends_count": 375,
"listed_count": 44,
"created_at": "Tue Aug 07 02:10:46 +0000 2012",
"favourites_count": 247,
"utc_offset": -14400,
"time_zone": "Eastern Time (US & Canada)",
"geo_enabled": true,
"verified": false,
"statuses_count": 1349,
"lang": "en",
"status": {
"created_at": "Sun Oct 25 01:52:10 +0000 2015",
"id": 658098694xxxxxxxxx,
"id_str": "658098694xxxxxxxxx",
"text": "#BenjamenKelly tonight!",
"source": "Twitter for iPhone",
"truncated": false,
"in_reply_to_status_id": 657368006075486200,
"in_reply_to_status_id_str": "657368006075486208",
"in_reply_to_user_id": 509529431,
"in_reply_to_user_id_str": "509529431",
"in_reply_to_screen_name": "Kelly",
"geo": null,
"coordinates": null,
"place": {
"id": "3877d6c867447819",
"url": "https://api.twitter.com/1.1/geo/id/3877d6c867447819.json",
"place_type": "city",
"name": "Fort",
"full_name": "Fort, IN",
"country_code": "US",
"country": "United States",
"contained_within": [],
"bounding_box": {
"type": "Polygon",
"coordinates": [
[
[
-85.336872,
40.95926
],
[
-85.003231,
40.95926
],
[
-85.003231,
41.214574
],
[
-85.336872,
41.214574
]
]
]
},
"attributes": {}
},
"contributors": null,
"retweet_count": 0,
"favorite_count": 1,
"entities": {
"hashtags": [],
"symbols": [],
"user_mentions": [
{
"screen_name": "Benj",
"name": "boy",
"id": 509529431,
"id_str": "509529431",
"indices": [
0,
14
]
}
],
"urls": []
},
"favorited": false,
"retweeted": false,
"lang": "en"
},
"contributors_enabled": false,
"is_translator": false,
"is_translation_enabled": false,
"profile_background_color": "C0DEED",
"profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png",
"profile_background_tile": false,
"profile_image_url": "http://pbs.twimg.com/profile_images/2479745010/yz4eu6wrca8c5e2hw6x9_normal.jpeg",
"profile_image_url_https": "https://pbs.twimg.com/profile_images/2479745010/yz4eu6wrca8c5e2hw6x9_normal.jpeg",
"profile_banner_url": "https://pbs.twimg.com/profile_banners/741935389/1444260221",
"profile_link_color": "0084B4",
"profile_sidebar_border_color": "C0DEED",
"profile_sidebar_fill_color": "DDEEF6",
"profile_text_color": "333333",
"profile_use_background_image": true,
"has_extended_profile": false,
"default_profile": true,
"default_profile_image": false,
"following": true,
"follow_request_sent": false,
"notifications": false,
"muting": false,
"blocking": false,
"blocked_by": false
}
This is what i am getting(supposing i have only 2 users in my following). What i need is as follows:
"geo": {
"type": "Point",
"coordinates": [
28.612486,
77.377425
]
},
"coordinates": {
"type": "Point",
"coordinates": [
77.377425,
28.612486
]
},
"geo": null,
"coordinates": null,
You need to filter out those details from the results yourself. The API will return the complete person object, not specific fields.