Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^4: Can't get API::Instagram to work

by igoryonya (Monk)
on Feb 13, 2018 at 20:51 UTC ( #1209086=note: print w/replies, xml ) Need Help??


in reply to Re^3: Can't get API::Instagram to work
in thread Can't get API::Instagram to work

I already got this part, i.e.: logged in and got auth url. What's next?
As I said, I can't figure out how to authenticate and ultimately, list posts.
I would really appreciate a working code example.
Thank You.

Replies are listed 'Best First'.
Re^5: Can't get API::Instagram to work
by marto (Archbishop) on Feb 15, 2018 at 08:58 UTC

    "I already got this part, i.e.: logged in and got auth url"

    This isn't in the code you've posted, it doesn't match the example from the docs.

    "I can't figure out how to authenticate and ultimately, list posts. I would really appreciate a working code example."

    With the exception of the Instagram documentation that I looked at out of curiosity, I know nothing about their system, what it does or why anyone would use it. That said the API::Instagram documentation has examples of how to get a users 'feed' (if this is what you mean by posts?):

    my $feed = $my_user->feed( count => 5 ); for my $media ( @$feed ) { printf "Caption: %s\n", $media->caption; printf "Posted by %s at %s (%d likes)\n\n", $media->user->user +name, $media->created_time, $media->likes; }

    "I would really appreciate a working code example."

    I don't have any use case for this, and am not going to jump through the hoops to get an account/API keys etc.. My suggestion would be to Use the source Luke. You have the API documentation from Instagram, you have the Perl source code for this module. Work the problem. Perhaps some of the tests can point you in the right direction. Once you work out what you want, consider suggesting improvements to the module documentation if you feel this would be of benefit.

      Your smug and condescending reply telling the OP to read the documentation is not helpful in the least. If you read his question and replies it is obvious that he has read the documentation; the code in his question is taken almost directly from the man page for API::Instagram. I agree with him that both the man page and InstaGram documentation you mention is unclear on getting a client_secret and what should be used in $code. His request for a short example of getting through the Authorize, Authenticate, and Requests process are not unreasonable (and would help me as well).
        Your smug and condescending reply...

        I don't see that at all. Someone was willing to look around and give advice. It's not a case for hostility when someone says frankly, "It's not obvious to me and I don't have the tuits to sink right now. You might try this..."

        "Your smug and condescending reply"

        There's nothing of the sort in any of my responses to this user.

        "telling the OP to read the documentation is not helpful in the least. If you read his question and replies it is obvious that he has read the documentation; the code in his question is taken almost directly from the man page"

        But 'taken almost directly' doesn't mean that it will work, or do what OP intends. In fact, I point out an example from the docs which claims to do what OP seems to want.

        "both the man page and InstaGram documentation you mention is unclear on getting a client_secret and what should be used in $code."

        What did Instagram say when you raised the issue with them? I see there are no open issues raised with the module in question. In light of Your Mothers finding, perhaps you should reevaluate your strategy entirely.

        "His request for a short example of getting through the Authorize, Authenticate, and Requests process are not unreasonable (and would help me as well).

        And nobody said anything suggesting it wasn't. I simply said that I wasn't best placed in so much that I don't have the time or interest to do this work for OP, or you. Your post here seems at best disingenuous.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1209086]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-06-22 21:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (124 votes). Check out past polls.

    Notices?