prowdsponsor / ig Goto Github PK
View Code? Open in Web Editor NEWBindings to Instagram's API
License: Other
Bindings to Instagram's API
License: Other
Instagram's documentation at https://instagram.com/developer/endpoints/ specifies that:
On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.
Hi there,
I've been trying to use getRecentTagged
which relies on auth token which itself depends on getUserAccessTokenURL1
.
The response I get is:
*** Exception: IGAppException (IGError {
igeCode = 400,
igeType = Just "OAuthPermissionsException",
igeMessage = Just "This request requires scope=public_content, but this access token is not authorized with this scope. The user must re-authorize your application with scope=public_content to be granted this permissions."})
Started looking at Scope
definition in the library and figured there is no constructor for public_content
and follower_list
Instagram API | Scopes.
Any chance new scopes can be added in the nearest future? ๐
The Envelope
type includes a Maybe Pagination
, which includes a pNextUrl
, but actually making a request using that pNextUrl
doesn't seem to be possible from outside the library. It seems like you would need at least the getJSONEnvelope
function, which isn't exported.
Is there a way that I'm missing to get "the next page"?
These error types are valuable for restricting error-handling logic to just the kinds of errors I care about, but they aren't exported even from Instagram/Types.hs, much less Instagram.hs. Is this intentional? If so, what is the correct mechanism to use these types?
$ python3 main.py
INFO:root:Opening config file.
INFO:root:Loading config file.
INFO:root:Initialize IG interface.
INFO:root:Get story tray.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): i.instagram.com
DEBUG:urllib3.connectionpool:https://i.instagram.com:443 "GET /api/v1/feed/reels_tray/ HTTP/1.1" 400 142
ERROR:root:Status Code Error.400
Traceback (most recent call last):
File "main.py", line 112, in
main()
File "main.py", line 77, in main
storyresp = ig.getStories()
File "/home/zhiwei/Documents/IG-Downloader/instagram.py", line 65, in getStories
return self.getReelTray()
File "/home/zhiwei/Documents/IG-Downloader/instagram.py", line 45, in getReelTray
response.raise_for_status()
File "/home/zhiwei/.local/lib/python3.6/site-packages/requests/models.py", line 935, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/feed/reels_tray/
Hi,
As I have tested some cases for data feed coming from Instagram by registering the Subscription of the real time updates, I see some new fields are added to the in coming structure.
I see ig package supports this feed by "Update" type, but this additional fields do not seem to be supported by this type.
Now update feed coming like this, that the ones under "data" field looks new ones.
[
{
"changed_aspect": "media",
"object": "user",
"object_id": "2157425226",
"time": 1441018341,
"subscription_id": 19731857,
"data":
{
"media_id": "1063661397067665037_2157425226"
}
}
]
I do not see this is properly documented in the Instagram API document, but do you have any plans to support this in near future?
Thank you,
Based on a couple of simple tests, it seems like many of Instagram's endpoints allow you to use a client_id instead of an access token.
https://instagram.com/developer/endpoints/?hl=en
However, it doesn't seem like ig supports the use of client_id. Are there any plans for supporting client_id in addition to access_token?
Instagram rolled out the new version of their API yesterday June 1 2016. In particular, they rolled out the following breaking change:
API responses containing media objects no longer return the data field in comments and likes nodes
This breaks Aeson parsing of the Media
type, specifically the mComments
and mLikes
fields. The Collection
wrapper expects a data
json array which no longer exists. The comments
and likes
nodes now only contain a count
field.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.