RE: (Part 5)Tutorial On Steem/SteemConnect JS Retrieve And Comment The Last Post @steemconnect pt5

You are viewing a single comment's thread from:

(Part 5)Tutorial On Steem/SteemConnect JS Retrieve And Comment The Last Post @steemconnect pt5

in utopian-io •  6 years ago  (edited)

Hello and thanks for the reply, I've ran your code and it actually works. But I've copied and pasted the same piece of code in mine, and strangely, I'm still getting a sc2-sdk null error.

Frankly, I'm quite baffled by what's going on. Here's my arrow function, and the data I've inputted.


submitComment = () => {

SteemConnect.comment("eaudebla", "crowthelegendvrreview-mdnmolwle9", "eaudebla", "re-crowthelegendvrreview-mdnmolwle9", "", "this is a test", "", function (err, res) {
console.log(err, res);
});

}

I

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  6 years ago (edited)

The function seems right. Did you initialize and log into SteemConnect?
The code for that is here
https://github.com/igormuba/steemhere/blob/class5/js/myscript.js
I empalia that on the previous tutorials, but maybe my didactics were not good enough at that time.
Also, make sure you have the package with the dependencies set
https://github.com/igormuba/steemhere/blob/class5/package.json

  ·  6 years ago (edited)

Yes, I already logged on steemconnect. I also have the dependencies installed. I’m going to upload my code on GitHub so maybe someone can have a look. Sorry to disturb, but I’m literally losing sleep over this. If you know anyone else who has worked on steemconnect, let me know. The scarcity of people using it is a problem.

EDIT: Here's my code in question
https://github.com/ChilledMatter/AkibaSteem

My comment function is under https://github.com/ChilledMatter/AkibaSteem/blob/master/src/components/PostDetail.js

  ·  6 years ago (edited)

This is really strange. I have got similar problem as only api.me function works. When I am trying to vote or post a comment I get 401 response...

The guy over at steemconnect's github page managed to fix it!

Just authorize your app here.

https://app.steemconnect.com/authorize/@steemconnect