cosenary / Instagram-PHP-API

An easy-to-use PHP Class for accessing Instagram's API.
http://cosenary.github.com/Instagram-PHP-API
BSD 3-Clause "New" or "Revised" License
1.46k stars 782 forks source link

Problem to get Access Token #135

Open drag0nman opened 9 years ago

drag0nman commented 9 years ago

Hello everybody, I have developed my applcation and it works.

The problem is that sometimes (2/3 hours in a day) without apparently cause the application doesn't work anymore when I try get the access token. After that I get the authentication code and the callback trys to get access token I get: [code] => 400 [error_type] => OAuthException [error_message] => No matching code found.

But I repeat the strange is that usually the same application works.

What is the problem? Maybe is the problem Instagram server? Thank you

alinberce commented 9 years ago

Hi, I get the same thing on my app, using a heroku server. I don't know if this is related to http://developers.instagram.com/post/116410697261/publishing-guidelines-and-signed-requests as it seems that they changed the API a lot.

I really hope that the awesome dev of this will implement Secure API calls (https://instagram.com/developer/secure-api-requests/) as Signed headers are no longer used

umutc commented 9 years ago

İ have same problem too. The scopes not works. Only basic scope works because its default.

click and see permissions that i sent likes + relationships but i only saw basic permision https://instagram.com/oauth/authorize/?scope=likes+relationships&response_type=code&redirect_uri=http%3A%2F%2Ftavsiyet.com%2Finstanbul%2Fsuccess.php&client_id=ee65ae5f706e47589a8e3ba2249c123f

alinberce commented 9 years ago

It seems that is something related with server IP maybe? I really hate it when a platform is so closed with so little communication to developers. They should email or something: Your server has been blacklisted for xxxx reason. Or why do some of my users get marked as spam bots? I mean, you gave me 100 likes / hour... let me use them how I want.... Well, it's just weird but I am glad the API exists :)

http://stackoverflow.com/questions/29848299/instagram-api-error-code-400-no-matching-code-found

drag0nman commented 9 years ago

@umutc I had same scope problem too. I fixed it in this way, with a trick: In the scope, I add twice 'likes'.

umutc commented 9 years ago

@drag0nman do you mean "scope=likes+likes+relationships"?

drag0nman commented 9 years ago

@umutc yes :) $instagram->getLoginUrl(array('basic','likes','likes'));

umutc commented 9 years ago

Hehe permission erorr now :) ( [error_type] => APIError [code] => 400 [error_message] => This client ID is not permitted to POST likes. For more info, please refer to our developer site at http://instagram.com/developer/endpoints/likes. ) i think i need to get in whited list https://www.facebook.com/help/instagram/contact/185819881608116

alinberce commented 9 years ago

So in the end, was this a problem from instagram or they updated the API and this library needs to be updated? @umutc please let us know if your app got approved. Thank you.

umutc commented 9 years ago

İnstagram

muhammeddilaver commented 9 years ago

@umutc hocam bu follow, unfollow, like gibi işlemler için official api şartı getirilmiş sanırım. Form doldurulması falan isteniyor herhangi bir çözüm bulabildiniz mi?

umutc commented 9 years ago

Sadece offical olmak da yetmiyor, uygulamanın bitmiş halini arayüzünü vs screenshoot ile yollamak gerekiyor. Çözüm olarak 1mayıs öncesi açılmış tokenler çalışıyor bulabilirsen birinden bana da haber ver. ;)

muhammeddilaver commented 9 years ago

@umutc 55 adet api aynı anda patladı gitti benim bot lanet olsun. (:

umutc commented 9 years ago

geçmiş olsun eğer bir çözüm bulursan mutlaka dönüş yap buraya.

alpagu commented 9 years ago

55 adet api yi ne yapıyordun yahu 1 tane yetmiyormuydu? ondan patlamış

2015-06-08 20:31 GMT+03:00 Umut ÇELİK notifications@github.com:

geçmiş olsun eğer bir çözüm bulursan mutlaka dönüş yap buraya.

— Reply to this email directly or view it on GitHub https://github.com/cosenary/Instagram-PHP-API/issues/135#issuecomment-110084638 .

İsmail Sait ALPAGU Cep :0090 544 661 4787