Giter VIP home page Giter VIP logo

php-instagram-api's Issues

Not working with composer

Fatal error: Class 'Instagram\Instagram' not found...

Composer's autoload_namespaces is generating:

'Instagram' => $vendorDir . '/php-instagram-api/php-instagram-api/Instagram',

and should instead read:

'Instagram' => $vendorDir . '/php-instagram-api/php-instagram-api/.',

Tests are useless

You shouldn't use real data in your tests because it depends on their existence in database which you are not going to test. In InstagramTest.php you test a lot of functions using access_token (which is of course now expired) and that mean you test Instagram too, which is not your business. What if Instagram is down for a moment or real data you use doesn't exists any more (like access_token) and run your tests? Your tests will fail but it is not because your code is wrong.

Instead of that, tests should deal with mock objects and tests only your code separated from third parties because, in this case, we expect that Instagram API works well. That is not our business, we want to take care about our code only.

error

Notice: Undefined variable: auth_config in /Volumes/B/Dropbox/i.local/examples/_auth.php on line 7

Notice: Use of undefined constant EXAMPLES_DIR - assumed 'EXAMPLES_DIR' in /Volumes/B/Dropbox/i.local/examples/_auth.php on line 19

Warning: require(EXAMPLES_DIR/views/_header.php): failed to open stream: No such file or directory in /Volumes/B/Dropbox/i.local/examples/_auth.php on line 19

Fatal error: require(): Failed opening required 'EXAMPLES_DIR/views/_header.php' (include_path='.:/usr/local/Cellar/php54/5.4.15/lib/php') in /Volumes/B/Dropbox/i.local/examples/_auth.php on line 19

Getting "Unknown Error" Exceptions randomly

I began getting comments from users of our web app (http://instaglimpse.com), that things were randomly not working. After some research, I realized that there was an exception being thrown in the AUTH part of the app, but the exception is simply "Unknown Error" — I came here to see if there were any updates and then tried to use your example site (http://galengrover.com/projects/instagram/) and encountered the same issue:
screen shot 2013-11-06 at 3 33 50 pm

I thought I'd open an issue here and see if anyone else has been encountering this random issue. Again, it happens every several requests. It has not been predictable.

ApiException: Problem (2) in the Chunked-Encoded data

Hi galen,

First, thanks a bunch for this library. I'm finding myself using it every once in a while through Composer and it's really nice.

I'm currently back working on a project I left aside for a couple of weeks, and found out my code using your library isn't working anymore :

$i = new Instagram\Instagram();
$i->setClientID('myclientid');
$test = $i->getTag('mytag')->getMedia()->getData();

This ends up with an "ApiException: Problem (2) in the Chunked-Encoded data". This exact same snippet used to work like a charm a couple weeks ago as I said ; I update my project's dependencies (including your library) through Composer on a regular basis, so I assume it's related to some change that occured in the meantime. Of course, I've tried various tags (no weird characters included, it's all [a-z]+) for the same result.

I can also tell you I already used your library on a previous project that went live before I start encountering this issue (which means I don't update its dependencies anymore), and it's still working, so I'm really positive this is caused by some recent change.

Could you please look into this ?

Regards,

Accessing data

Hi,
I feel kind of stupid asking but I guess is worse not to leaner, I have installed the package on larvel and it seems to work fine but all data is protected , Ive try doing things like

$this->instagram = new Instagram\Instagram( $this->token );
$raw_data = $this->instagram->getTagMedia( $tag , array('count' => '100') );
$this->instagram->setData($raw_data);

but still Im not able to do
json_encode( $this->instagram->getData() );

since everything is coming back as protected...

Im I missing something? what would be the right way to access the data?

Thanks for any help

Fatal error: Class 'Instagram\Core\BaseObjectAbstract' not found in C:\xampp\htdocs\domains\comealive\components\com_comealive\helpers\instagram\Media.php on line 25

Kept giving me this error for practically every file required. Had to solve it like this in Instagram.php

namespace Instagram;
require_once 'Core/BaseObjectAbstract.php';
require_once 'Core/Proxy.php';
require_once 'Net/ClientInterface.php';
require_once 'Net/CurlClient.php';
require_once 'Collection/CollectionAbstract.php';
require_once 'Collection/MediaCollection.php';
require_once 'Collection/TagMediaCollection.php';
require_once 'Net/ApiResponse.php';
require_once 'Media.php';

use \Instagram\Collection\MediaSearchCollection;
use \Instagram\Collection\TagCollection;
use \Instagram\Collection\TagMediaCollection;
....

Fatal error: Class not found

Fatal error: Class 'Instagram\Core\Proxy' not found in C:\xampp\htdocs\Insta\Auth.php on line 54

Auth.php on line 54:
$this->proxy = new \Instagram\Core\Proxy( $client ? $client : new \Instagram\Net\CurlClient );

I hope someone help me with that, I try to solve it for 5 hours!

I have create index.php, and this the code inside:

'*deleted*', 'client_secret' => '*deleted*', 'redirect_uri' => '*deleted*', 'scope' => array( 'likes', 'comments', 'relationships' ) ); $auth = new Instagram\Auth( $auth_config ); if (isset($_GET['code']) && !empty($_GET['code'])){ $_SESSION['instagram_access_token'] = $auth->getAccessToken( $_GET['code'] ); echo 'ok'; }else{ $auth->authorize(); } ``` ?>

Load more button with images

Hey Galen,

I have got your Instagram PHP class working okay in my Laravel app.

I wondered how hard it would be to have a load more button in the site with images, say load more images obviously sticking to the Instagram amount every time so 20 loaded through the pagination->next_max_id. I have seen an example of it here https://gist.github.com/cosenary/2961185.

I just wondered how easy it would be with your PHP Library?

Cheers

problem on new server with Media class

try to load current user page, get 500 error, logs says:

PHP Fatal error: Class '\Instagram\Media' not found in path-to-folder/Instagram/Collection/CollectionAbstract.php on line 124, referer: my-domain/Examples/

looks like some server settings wrong, but don't know which one...

server PHP Version 5.3.2-1ubuntu4.18

List of issues.

#1 No where in the Instagram system is there an APP_KEY.

You have a client_id, but by asking for a KEY vs and ID, you completely throw people off.
#2 ../ makes you go backwards a directory. git clone imports to PHP-Instagram-API, so if a party goes backward, that won't work either. So your require statement is broke.
#3 using composer? you can't, nobody knows the project name to use. Your instructions completely fail here too.

{
"require": {
"cosenary/Instagram-PHP-API": "2.2.*"
}
}

produces:

Problem 1
- The requested package cosenary/instagram-php-api could not be found in any version, there may be a typo in the package name.
#4

Something went wrong :(

I have no clue what this is supposed to mean. zero error handling. Your guess is as good as mine. Anywhere you put a var_dump(), you can't get to the output.

your software is broken because your instructions are so poor.

Tag a version

Can you please tag a version so we don't need to use dev-master which may have BC breaks?

Parse syntax error Instaphp.php Line 53

Hello,

I have downloaded the api, and upload the files at my server.

I opened Instaphp.php with my browser, and have the following error:
Parse error: syntax error, unexpected '[' in Instaphp.php on line 53

Is that a problem in the api script? I have nothing edited, only uploaded the files.

The code on Instaphp.php line 53:
private static $endpoints = [];

ApiException thrown when calling getTag('äää') with parameter including unicode chars

When I call

$instagram = new Instagram;
$instagram->setAccessToken('xxx');
$tag = $instagram->getTag('MyTäg');
$media = $tag->getMedia([]);

an Instagram\Core\ApiException is thrown with message 'Unknown Error'. When I remove the 'ä', it works fine. I have tried utf8_decode and iconv, but they have not helped.

The special characters get converted to something like MyT\xC3\xA4g which, of course, does not work in the URL https://api.instagram.com/v1/tags/<TAG>/media/recent

Deprecation Warning

For the record, here is a deprecation warning : 'next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead'.

Codeing is according to java Should be in PHP

I just saw an issue with the library. That there problem to create objects of classes because the code is here are like java. And I am unable to use your library.
error are showing like this

Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/mytestse/public_html/instagram/Instagram/Auth.php on line 52

Warning: Unexpected character in input: '' (ASCII=92) state=1 in /home/mytestse/public_html/instagram/Instagram/Auth.php on line 52

Parse error: syntax error, unexpected T_STRING, expecting '&' or T_VARIABLE in /home/mytestse/public_html/instagram/Instagram/Auth.php on line 52

Thanks
Vishnu Dutt

Check if access token is valid?

Is there any way of checking if access token is valid?

Would love something like this: $instagram->isAccessTokenValid($access_token);

Right now I am in a situation where I cannot get accesstoken through oauth2 and if the access token for some reason is not valid, then I get the exceptions thrown.

Post image at Instagram

Hey,

Can We able to post the image into the instagram?

I need to get Auth from the User to get the Access Token and then use that Access token to post image at instagram with same user's profile.

Can you please help me?

Tag the stable release

Would be great if it will be some stable release tagged in this repo (branch or tag).
I'm afraid of using "master" in composer.json

composer file issue

Hello, I don't want to use "composer.json" file. Is it possible to implement the codes without the "composer.json" file.

Regards.

Accessing Tags without Auth

I'm unable to access a tag (e.g. #fun) without having to redirect the user to the Authentication page - even though the tags method doesn't need this

Deprecated parameter when trying to get media from tag collection

API returns a deprecated warning when not specifying the parameters :

Called :
$tag = $instagram->getTag( 'nofilter' ); print_r($tag->getMedia());

Result :

Object@
(
    [pagination:protected] => stdClass Object
        (
            [deprecation_warning] => next_max_id and min_id are deprecated for this endpoint; use min_tag_id and max_tag_id instead
        )

    [data:protected] => Array
        (
        )

    [position:protected] => 
)

\ Error

Hey guys!

I'm trying to make an Instagram auth site.

register(); $auth_config = array( 'client_id' => 'dcbcbdb34ab04f108cb83942d13e5659', 'client_secret' => 'b6584624ed90408c8da3f9d6317a24b0', 'redirect_uri' => 'http://mypapr.com/instagram_callback.php', 'scope' => array( 'likes', 'comments', 'relationships' ) ``` ); ``` $auth = new Instagram\Auth($auth_config); echo($auth->getAccessToken($_GET['code'])); ``` /\* mysql_query("INSERT INTO `$email` VALUES ('instagram_access_token', '$access_token')"); */ ``` } else { } ``` } This is my code ^. When it runs I get this error: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/mypapr/public_html/instagram_callback.php on line 31 Parse error: syntax error, unexpected T_STRING in /home/mypapr/public_html/instagram_callback.php on line 31 I'm completely lost as to how those backslashes even function... Can I get an explanation?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.