This repository has been archived by the owner on Jan 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Associating facebookarchive/python-instagram Functions API with CWebsiteMS #259
Closed
SpillChek2
wants to merge
213
commits into
facebookarchive:develop
from
creativewebmatrixsolutions:master
Closed
Associating facebookarchive/python-instagram Functions API with CWebsiteMS #259
SpillChek2
wants to merge
213
commits into
facebookarchive:develop
from
creativewebmatrixsolutions:master
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.5 support.
which gives you an access_token response for a client who is already authorized.
…s error if scope is blank.
…f the call back uri.
Fixed a typo and updated docs
Added captions to Media model objects
The Instagram API is signed with a GeoTrust Global CA. Unfortunately this CA root certificate is not part of the default cacert.txt file that ships with httplib2. Rather than ship the certificate file, let's just ignore the SSL validation issue. Once the upstream bug is fixed, http://code.google.com/p/httplib2/issues/detail?id=156 we can revert this change.
Check for that before constructing the Point Without this small fix, repeatedly doing a query will eventually result in: >>> from instagram.client import InstagramAPI >>> instagram_api = InstagramAPI(**{'client_id': 'something', 'client_secret': 'hidden'}) >>> instagram_api.media_popular() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "instagram/bind.py", line 130, in _call return method.execute() File "instagram/bind.py", line 121, in execute content, next = self._do_api_request(url, method, body, headers) File "instagram/bind.py", line 97, in _do_api_request obj = self.root_class.object_from_dictionary(entry) File "instagram/models.py", line 49, in object_from_dictionary new_media.location = Location.object_from_dictionary(entry['location']) File "instagram/models.py", line 95, in object_from_dictionary if entry['latitude']: KeyError: 'latitude' >>>
Returning the access_token is useful, but even more important is knowing which user has granted us access.
The method was not specified, so it defaults to GET. And, whilst the GET seems to work, it actually does not.
…-user As well as returning the access_token, return who it is associated to
Relationship changes are a POSTed.
Not all Locations have latitude / longitude.
added a flag 'return_json', to return the raw api response instead of media objects
Disable SSL validation.
… to args. This makes it available to the location object as location.point. When being passed in the args it was not being added to the Location class because the args were not being iterated over.
… introduced in 79c41e1 - All tests were previously failing with error `TypeError: object of `NoneType` has no len()`: https://travis-ci.org/Instagram/python-instagram/jobs/58567079 - If we weren't given a `client_secret`, we don't have a secret to sign the request with, so `_signed_request()` should just return the empty string.
…d_request_no_client_secret Fixes all tests failing because of `None` secret passed to `hmac.new`
Return empty array instead of AttributeError when media has no tags.
removed extra whitespaces
fix _encode_multipart bug
… allow us to build a path without the format This is necessary because unlike the other endpoints, `media/shortcode/{shortcode}.json` 404s and should just be `media/shortcode/{shortcode} ```python api = InstagramAPI(access_token=access_tken) api.media_shortcode('os1NQjxtvF') ``` raises ```InstagramClientError: (404) Unable to parse response, not valid JSON.``` ```python api = InstagramAPI(access_token=access_tken) api.media_shortcode('os1NQjxtvF') ``` returns ```Media: 933107621857404944_231015329` as expected.
… are supported by user_recent_media endpoint.
Update README.md
code highlighting for the pip command.
…gram into Crowdbooster-master
…gram into nomadjourney-master
…into jimmyho-master
…backs Make registered subscription callbacks tied to the reactor instance.
…nation-example Add exhaustive pagination example to README
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Open
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
https://cwebms.visualstudio.com/CWebsiteMS/_git/CWebsiteMS