Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get an direct Instagram link from a twitter entity?

I have a twitter feed and I can find the instagram url in a tweet.

{
    indices: [
        90,
        110
    ],
    url: "http://t.co/kF9EXifn",
    expanded_url: "http://instagr.am/p/QC8hWKL_4K/",
    display_url: "instagr.am/p/QC8hWKL_4K/"
}

What I need is to take the expanded url from that object "http://instagr.am/p/QC8hWKL_4K/" and get the link to just the image itself, not the image on the Instagram site. Anyone know how to do that? Can I even derive the that link from the url?

like image 290
earl3s Avatar asked Oct 01 '12 22:10

earl3s


People also ask

How do you share a Twitter reel on Instagram?

When you take a photo or video on Instagram, you'll have the option to turn sharing on or off for each of the social networks (like Facebook or Twitter) you want to share to. Go to your profile and tap . Tap Settings. Tap Account > Sharing to Other Apps, then tap a social network to log in and link the accounts.


1 Answers

You can get just the image by appending /media/ to the URL. Using your example: http://instagr.am/p/QC8hWKL_4K/media/.

You can even specify a size,

One of t (thumbnail), m (medium), l (large). Defaults to m.

So for a thumbnail: http://instagr.am/p/QC8hWKL_4K/media/?size=t

Documentation here.

like image 50
John C Avatar answered Oct 18 '22 21:10

John C