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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T09:28:34+00:00 2026-06-07T09:28:34+00:00

Right, based on this question Tweet clickable links with twitteroauth? , How do I

  • 0

Right, based on this question Tweet clickable links with twitteroauth?,

How do I actually parse the entire string and replace the t.co link portion with a

<a href=""></a>

portion?

For example i tweet this –

Hey check out this link www.google.com

and in my website currently it shows

Hey check out this link http://t.co/generatedlink

So how do i parse it and make it into this

Hey check out this link <a href="http://t.co/generatedlink">http://t.co/generatedlink</a>

which would display like this in my website:

Hey check out this link http://t.co/generatedlink

How am I able to detect that a certain portion of the tweet text has a link inside it? Or am I going about this 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-07T09:28:37+00:00Added an answer on June 7, 2026 at 9:28 am

    You need to understand Twitter Entities.

    When you request the tweet, make sure you use include_entities=true

    For example:

    https://api.twitter.com/1/statuses/show.json?id=220197158798897155&include_entities=true
    

    In the response, you will see an element called “entities” inside that, you will see “urls”.

    That will contain all the URLs and their position (indices) within the tweet.

    "text": "Twitter for Mac is now easier and faster, and you can open multiple windows at once http://t.co/0JG5Mcq",
    
    "entities": {
    
      "urls": [
    
        {
    
          "url": "http://t.co/0JG5Mcq",
    
          "display_url": "blog.twitter.com/2011/05/twitte…",
    
          "expanded_url": "http://blog.twitter.com/2011/05/twitter-for-mac-update.html",
    
          "indices": [
    
            84,
    
            103
    
          ]
    
        }
    
      ],
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Based on an answer I saw in this question: Link I'm wondering, is this
Based off this SO question about counting forgein keys , I have a problem.
I am not pretty sure if this the right place for this question, if
Hey guys. This is a follow-on from this question : After getting the right
I'm not sure, if it's the right place here to ask this question. But
Not all that sure how I would describe this question, so I'll jump right
This is NOT a question on plain old boring customization; I actually want to
I'm (sort of) reposting this question, which is based on this previous question: multiple
I want this integer array to be sorted in the right order based on
We are building a web based solution right now and it is almost ready

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.