Giter Club home page Giter Club logo

instagram-php-api's Introduction

## This is a very simple instagram API implementation in PHP.

Make sure you check out the example.php file that is provided along with the code which is almost self explanatory.

instagram-php-api's People

Contributors

danielcosta avatar fransimo avatar j-patel avatar jameswednesday avatar macuenca avatar stephenyeargin avatar yzinkovets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

instagram-php-api's Issues

getUserRecent returns empty response

getUserRecent(USER_ID) returns the following (local testing) :

array(
'pagination' => array(),
'meta' => array(
'code' => (int) 200
),
'data' => array()
)

Any idea why ? Getting user data or follower list works ok...

getLocationRecentMedia($id) return an empty response

Similar to what was happening in #2, given this sample code:

$recent = $instagram->getLocationRecentMedia($location_id);

generates a URL that looks like:

https://api.instagram.com/v1/locations/82127/media/recent/?max_id=0&min_id=0&max_timestamp=0&min_timestamp=0&access_token={access_token}

and a response that looks like:

`{

"pagination": { },
"meta": {
    "code": 200
},
"data": [ ]

}`

rather than the expected list of photos. The trouble, again like #2, is that the request is essentially asking the API "Give me everything that happened between timestamp/ID zero and timestamp/ID zero"

Unfollow user

Not an issue, but I couldn't find anywhere to get help with the code. I have the example up and running,
I have a html doc that loads my last 50 followings and a button next to each one. I would just like to know how to unfollow a user by pressing on the button next to their name.

Thanks,
Chase

getRecentTags stopped working about a month ago

Been using this code for months and it just stopped working on Apr 20 I'm not getting another response (empty) for about 25 different tags I'm looking for. Anyone know of known issues or changes in the API? Thanks in Advance

Some critical bugs:

  1. public function postMediaComment has invalid method $this->_init();
    it must be removed
  2. $_endpointUrls:
    'post_media_comment', 'delete_media_comment', 'post_like', 'remove_like' must have /s instead of /d for sprintf
  3. generally: it is much better to save accessToken in session

Problem

Hello,
Sorry for disturbing you really.

But here's what I've done and it still doesn't work:
I tried with XAMPP, WAMP, UniServer and Apache Server with PHP

I got the same errors, I just can't get or doesn't get data from Instagram about the access token,
Could it be that it's my computer that doesn't reach or can't send the request?

If so please could you just tell me some solutions to this, it has gone many days and I'm on the same problem, I'd really appreciate it.

PS. I formatted my computer, and still got the same error, my ports are opened, and yesterday I tried your script on a webhosting, it works perfectly.

What is my problem, could you just give me some tips?

This error is from error.log
[Sun Nov 18 14:49:55.678713 2012] [:error] [pid 4256:tid 1140] [client 80.217.67.83:53654] PHP Notice: Trying to get property of non-object in C:\webserver\www\callback.php on line 33

This error is from access.log
80.217.67.83 - - [18/Nov/2012:18:48:14 +0100] "GET /callback.php?code=c66f485eeca4405392fd17392e953c77 HTTP/1.1" 200 124
80.217.67.83 - - [18/Nov/2012:18:48:15 +0100] "GET /favicon.ico HTTP/1.1" 404 209

Thank you for your time

the curl object return empty response because of https

I guess it's not happened to everyone if i don't see this comment till now
I work on my local windows 7 machine with apache.
since every call to instagram API is in https protocol u have to put the curl flag CURLOPT_SSL_VERIFYPEER set to false:
in "_setOptions" function:
curl_setopt($this->handler, CURLOPT_SSL_VERIFYPEER, false);

This solves the problem for local testing use.

Pagination with definable variables

I was looking for a simple way to exercise pagination parameters easily.

I can see how endpoints could or "would" be used but I am also unsure of how to implement on the frontend to allow a user to easily page through their entire UserFeed after login.

deleteComment

I don't know actully what's the problem but deleteComment doesn't do anything for me.

I tried to do something like this:
$userinfo = $instagram->getUser($_SESSION['InstagramAccessToken']);

// After getting the response, let's iterate the payload
$ures = json_decode($userinfo, true);
$recent = json_decode($instagram->getUserRecent($ures['data']['id']),true);

foreach($recent['data'] as $media) {
foreach($media['comments']['data'] as $comment) {
if(strpos($comment['text'], 'Lorem ipsum') !== false) {
$instagram->deleteComment($media['id'], $comment['id']);
}
}
}

The data i pulled out correctly but that line of code meant to delete the comment is just doing nothing.

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.