Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instagram Platform Update #182

Closed
vinkla opened this issue Nov 18, 2015 · 45 comments
Closed

Instagram Platform Update #182

vinkla opened this issue Nov 18, 2015 · 45 comments

Comments

@vinkla
Copy link
Collaborator

vinkla commented Nov 18, 2015

On the 17 Nov 2015 Instagram made changes to their API . Apps created before Nov 17, 2015 wont be affected until Jun 2016. Apps created on or after Nov 17 2015 will require to use their updated API. Please note that this library doesn't yet support their new updates.

When we launched our first Instagram API in 2011, we were a very small team and knew we wouldn’t be able to build all the features our community might want. Today we are announcing several platform changes to improve people’s control over their content and set up a more sustainable environment built around authentic experiences on the platform…
http://developers.instagram.com/post/133424514006/instagram-platform-update

I guess we need to rethink this entire library in order to work with the latest changes. This will require a lot of efforts and there is currently no plan to update this library.


If you're just looking for a simple way to fetch a public Instagram feed, you can checkout this package: vinkla/instagram.

@bcbud
Copy link

bcbud commented Nov 18, 2015

Looks like they updated /media/search to require auth...

Instagram.php (227)

 public function searchMedia($lat, $lng, $distance = 1000, $minTimestamp = NULL, $maxTimestamp = NULL) {
    return $this->_makeCall('media/search', false, array('lat' => $lat, 'lng' => $lng, 'distance' => $distance, 'min_timestamp' => $minTimestamp, 'max_timestamp' => $maxTimestamp));
  }

needs the false $auth to be set to true

 public function searchMedia($lat, $lng, $distance = 1000, $minTimestamp = NULL, $maxTimestamp = NULL) {
    return $this->_makeCall('media/search', true, array('lat' => $lat, 'lng' => $lng, 'distance' => $distance, 'min_timestamp' => $minTimestamp, 'max_timestamp' => $maxTimestamp));
  }

@jufy
Copy link

jufy commented Nov 19, 2015

Also need to update scopes
https://instagram.com/developer/authorization/
— basic - to read a user’s profile info and media (granted by default)
— public_content - to read any public profile info and media on a user’s behalf
— follower_list - to read the list of followers and followed-by users
— comments - to post and delete comments on a user’s behalf
— relationships - to follow and unfollow accounts on a user’s behalf
— likes - to like and unlike media on a user’s behalf

@sbolognini
Copy link

Hi,
now even the getTagMedia needs an access_token to work.
I have a big doubt: how can I have access to recent media without making the user to login?
I explain myself: I built a website with a backend area. In this area I add the authentication data for an Instagram app (Client ID and Client Secret) and a tag. The frontend shows the recent medias for that tag. Simple.
Now things are changed and an access_token is needed.
So how can I show the same recent medias without make the user login to Instragram? The app only shows the global recent medias, not user info.
I reviewed the repository code, but I cannot understand how THE APP could generate via code an access_token to be used for recent media query.

Thanks for your time.

Simone.

@iadj
Copy link

iadj commented Nov 27, 2015

Is it possible to still use this API with the update apart from some of the features that require updating the API?

@odelrio
Copy link

odelrio commented Dec 3, 2015

To fix photo uploading...

  1. In Instagram::GenerateSignature() replace the key with:
    3f0a7d75e094c7385e3dbaa026877f2e067cbd1a4dbcf3867748f6b26f257117
  2. Replace the User Agent with:
    Instagram 7.1.1 (Android; 21/5.0.2; 480dpi; 1080x1920; OnePlus/ONEPLUS; A0001; A0001; qcom; en_US)
  3. Set ig_sig_key_version=6 to ig_sig_key_version=4.

@shrunyan
Copy link

shrunyan commented Dec 3, 2015

@iadj Yes it is. I'm still currently using it to fetch hashtag based media but have lost access to user media due to the public_content scope addition.

@phirestalker
Copy link

the scopes problem is easily patched by editing line 74 to read:

private $_scopes = array('basic', 'public_content', 'follower_list', 'likes', 'comments', 'relationships');

@sanikkenway
Copy link

I'm getting turned down couple of times for submission on basic and public_content, what actually I have to provide for the submission? I just want to curl trending Instagram photos into php
this is sample for now as I can only curl for my own media only

https://sanik.my/gallery/instagram

any insights?

@Brumley
Copy link

Brumley commented Feb 1, 2016

Hello, did anyone get the permission review accepted after the update? I followed the valid use cases and i got the permissions declined everytime i tried it. Thanks

@phirestalker
Copy link

I'd give up on instagram if I were you. They don't like anyone but them
making money from their platform, and they could give a shit about the
developers. They change the rules all the time, usually without warning.

On Mon, Feb 1, 2016 at 8:35 AM, Brumley notifications@github.com wrote:

Hello, did anyone get the permission review accepted after the update? I
followed the valid use cases and i got the permissions declined everytime i
tried it. Thanks


Reply to this email directly or view it on GitHub
#182 (comment)
.

@florianbeer
Copy link

I've just submitted a pull request #204 that should fix this package to work with Instagram's API changes.
@cosenary please consider merging this in and thanks for your very helpful library!

@vinkla
Copy link
Collaborator Author

vinkla commented Mar 8, 2016

Until this is fixed everyone could check out this repository https://github.com/hassankhan/instagram-sdk

@florianbeer
Copy link

Why don't you accept pull requests on this repo?
In #204 I fixed everything and as far as I can see it's perfectly usable again.

@vinkla
Copy link
Collaborator Author

vinkla commented Mar 8, 2016

Please bare in mind that I'm not the maintainer. I've only helped out with the syntax changes.

@florianbeer
Copy link

Sorry, I thought you had merge rights as well.
Anybody knows if the author is still willing to maintain this project? If not, I'll switch out this package with my fork in my composer.json and be done with it.

@iadj
Copy link

iadj commented Mar 8, 2016

@florianbeer Please do. Last time this git was updated was last year.

@melnikoved
Copy link

@florianbeer Could you publish your fork? And we will be able to enjoy this library with new API

@florianbeer
Copy link

Already did, a week ago: https://github.com/florianbeer/Instagram-PHP-API

@melnikoved
Copy link

Yes. But it is still "fork". It would be great if you changed name of library from "cosenary/instagram" to your. So we can use composer to upload it.

@florianbeer
Copy link

But that would be stealing, it is still @cosenary's work.

You can add the following to your composer.json to use my fork:

"repositories": [                                                                                                                                                                
    {                                                                                                                                                                            
        "url": "https://github.com/florianbeer/Instagram-PHP-API.git",                                                                                                           
        "type": "git"                                                                                                                                                            
    }                                                                                                                                                                            
],

and then require "cosenary/instagram": "dev-master"

@melnikoved
Copy link

But if I use "dev-master" - it upload a last stable commit.
How can I use your last commits?

@melnikoved
Copy link

Yes. It works now. But I have now

Invalid state

        || ($this->getInput('state') !== $this->store->get('oauth2state'))
    ) {
        $this->store->set('oauth2state', null);
        throw new CsrfException('Invalid state');
    }
    return;
}

@Brumley
Copy link

Brumley commented Mar 21, 2016

hello guys, has anything changed with API permission review? Did anyone get the permission from instagram to any scope? Thanks

@smvanbru
Copy link

@florianbeer , this is an open-source project. If @cosenary is no longer maintaining it (and that seems to be the case given that he hasn't chimed in on any of this yet), creating a new non-forked repo that gives attribution to @cosenary seems to me to be a legitimate way to keep the project moving forward. For those of use who are trying to build production-level systems, it would be nice to be able to include a stable source in our composer setup. Thanks!

@florianbeer
Copy link

This package is still 99,9% @cosenary's work. If he wants me to take over and clearly states so, I will think about it, not sooner. If you want to use my fork in the meantime, you can alter your composer.json to fetch the code from my repository.

@BR0kEN-
Copy link

BR0kEN- commented Sep 17, 2016

@florianbeer, with the repositories inside of composer.json and dev-master won't work. See composer/composer#2622

Supposed that @cosenary are no longer interested in development on Github anymore.

@timothymarois
Copy link

I'm assuming this API is dead now that is hasnt been updated to the new Instagram API changes of last year? So its not worth utilizing at all?

@timothymarois
Copy link

@florianbeer if cosenary is not here to maintain a broken system, It must move on. No matter who created the work. It must move on and adapt. If it's from the original author or not. That is open source.

@pvledoux
Copy link

@florianbeer Do we have any update on this issue? If anyone want to take the responsibility of this repo, can we just create a fresh one without hurt anybody? It's really blocking for a lot of people.

@florianbeer
Copy link

Well I would be open to maybe transferring my fork to a GitHub organisation and publishing it to Packagist if I can get some co-maintainers. I don't think there's enough incentive for me to take care of issues, PRs etc. all on my own, seeing that my fork does everything I need it to do for my project for the foreseeable future.

So any volunteers to take on a (co-) maintainer role in an open source project and spending countless hours of unpaid work on keeping it up to date?

@dimassrio
Copy link

@florianbeer I want to volunteer, since I'm gonna also use the API for some prototyping, might as well explore the API depthly and help the public.

@BR0kEN-
Copy link

BR0kEN- commented Sep 27, 2016

@florianbeer I'm gonna help as well if you are not have concerns. Currently I had to do a fork from your fork and created a Composer package on its basis: https://github.com/propeopleua/Instagram-PHP-API

But I do not like this!

@florianbeer
Copy link

@dimassrio I've added you as collaborator (push permission) on my repository and will publish it on packagist today.

Anybody else who wants to participate, please feel free to give me a shout!

@florianbeer
Copy link

@BR0kEN- great, you're added as well.

@florianbeer
Copy link

Hmm, seems I have to "un-fork" (is that the correct GitHub terminology), to publish to packagist. I will investigate further later today, as now I have to leave for a meeting.

@pvledoux
Copy link

@florianbeer cool! I can help, no problem!

@BR0kEN-
Copy link

BR0kEN- commented Sep 27, 2016

@florianbeer, you can publish forks but this practice isn't recommended. So, better to create an independent package.

@pvledoux
Copy link

Hi @florianbeer, any news on this?

@killua99
Copy link

killua99 commented Nov 4, 2016

Lookin forward to use your fork @florianbeer

@pvledoux
Copy link

@florianbeer This again .. ;)
Actually, if you rename your forked branch as dev-master, we will be able to use your repository in composer. See http://stackoverflow.com/questions/13498519/how-to-require-a-fork-with-composer. I just tried by forked your branch and it worked.

@vinkla
Copy link
Collaborator Author

vinkla commented Dec 10, 2016

It has been over a year now. I'm closing this.

@vinkla vinkla closed this as completed Dec 10, 2016
@BR0kEN-
Copy link

BR0kEN- commented Dec 11, 2016

Everyone who need this could use forked package: https://github.com/propeopleua/Instagram-PHP-API/blob/master/composer.json#L2

@vinkla
Copy link
Collaborator Author

vinkla commented Dec 11, 2016

If you're looking for a simple way to fetch a public Instagram feed, you can checkout this package: vinkla/instagram.

@PanMan
Copy link

PanMan commented Apr 13, 2017

https://github.com/Andreyco/Instagram-for-PHP works and is supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests