r/Scriptable • • Feb 18 '21

Widget Instagram Latest Posts

Alice gently remarked; 'they'd have been changed in the distance would take the hint; but the Dormouse indignantly. However. ― Cristina Green

F137FFB4-B9A1-4433-B907-68F4FF81A933

22 Upvotes

10 comments sorted by

1

u/francisgoca Feb 18 '21

Why does this widget asks for a login while the other didn’t?

3

u/[deleted] Feb 18 '21

tl,dr: because the old way no longer works consistently


Previously, Instagram allowed getting the list of posts for public users without logging-in. They have changed, allowing you to only do that a very limited number of times and then it redirects to the login page instead of providing the data.

That caused the format error because the script expected JSON data but was receiving HTML.

The solution is to actually allow you to login and save your "session cookie" and use that cookie for succeeding requests. If you want to, you can see this session cookie in your iCloud drive - /Scriptable/cache/igclient/session.json.

1

u/lintgamer Jan 24 '22

Since last week I have an error that he doesnt find resp.graphql.shorcode_media. Any solution?

1

u/_sidyou Aug 01 '21

The JS is error on my iphone, why?

0

u/[deleted] Feb 18 '21

How do I run this in my phone? I am new to Scriptable

2

u/francisgoca Feb 18 '21

Download the scriptable app then download the code and copy paste it to a new script. Should work.