10 SBD SteemJS Programming Question

in #steemjs7 years ago

This will return the information for a post. I'm using an example post (https://steemit.com/contest/@money-dreamer/30-sbd-webgl-screen-capture-contest) from my blog below.

This is the way I am trying to get the accounts that resteemed my post:

steem.api.getContent('money-dreamer', '30-sbd-webgl-screen-capture-contest', function(err, result) {
    console.log( result.reblogged_by ); //always empty array
});

Resteems are not in an accounts history. Also, the reblogged_by array is always empty:

  var query = {
    tag: 'money-dreamer',
    limit: 10
  };
  steem.api.getDiscussionsByBlog(query, function (err, result) {
    console.log( result[0].reblogged_by ); //always empty array
  }

I'll give the first person that finds a working example of JavaScript/NodeJS that gets a list of accounts that resteemed a post 10 SBD.

Sort:  
Loading...

What a clever way to get code, I love it!! Totally re-steeming and probably steeling the idea for later ;)

@dalegraunke and @alao you guys check this out and work some magic. Whoever figures it out first gets an extra 5 SBD from me! 🤑

@sambillingham found a correct solution, so I sent him 10 SBD. I still would like to find a solution to read directly from the blockchain so I don't have to pay no 3rd party services.

Thanks!

Yeah, I wasn't pleased when they started charging for that sql database. I totally get it why he had to do it though. We'll keep looking.

Thanks! Let's hope this works and others use this strategy in the future.

I think I have your answer. Only post that have been payed out (older than 7 days will show who resteemed).
Here's the latest post that is 7 days old and you can see all the resteems. https://steemdb.com/introduceyourself/@money-dreamer/my-educational-background/reblogs

Do you really need code or just a way to find the re-steems? Will this work for you?
Capture.JPG

Practically all the information you could want is right there for you.

R-click and "open image in a new tab" to see it full-size.

I need the code, but thanks for posting this!

You are most welcome. If you want to post a link to this advertisement (or any others) on my weekly buy/sell/trade/want ads pages, I would be most appreciative of it. I use the #happystore tag.

Nice, I might have to have a poke about later and see what's in the API as I've not had a look, yet.

Dammit, I literally just started learning java a few weeks ago and don't know how to use anything in the Steem resource library. Maybe next time :(

To be fair Java and JavaScript are actually completely different languages, that superficially may have a few similarities in appearance.

There was one joke about that. Java and Javascript are so equal like Car and Carpet.

I don't think that array ever gets used, if you look on steemd they also always have an empty reblogged array, I can't be sure but I think this is up to the implementing app to fill in, only one I found that does this is esteem app , I have not seen posts created by busy, steemit, dmania etc have this filled in , this is just from comparing a few blog results with feed results to try and find a connection.

I think most apps only know you resteemed something since they maybe compare the author with the account name , no match = resteem.

It seems also that you will not know who resteemed it since there will only ever be a single origin of the post on the blockchain, apart from having a relational index that maybe could compare all feeds that contain that permalink or post id I do not see how you would know. A very costly query.

I might be wrong but poking around for 30min this is my conclusion.

I've been poking around too, and it seems as though this isn't being used.

I did wonder if whatever database (or whatever) that is used to generate the json file has the data, but then in the query that creates the json object, the SQL is malformed somehow resulting in an empty array.

I think I found something. If you view according to account history you can see the action transactions, reblogging is a custom json transaction that falls under follow. will update once I can confirm. haha just wanted to reply it seemed a bit exciting.

edit: nvm @sambillingham posted a nice explanation of what I found also.

I read something about reading through the custom json transactions to find data. That would be nice if the reblogged_by could be retrieved this way.

I'll do what i can by Upvoting and Resteeming! by @cryptoryno33
I have a lot of respect for programmers. I was taking a JavaScript class in California a while back and while the teacher was doing his lesson, students were hacking into his screen and saying and doing all kinds of things. I have even heard that grades can be changed. Students are the teachers now. Keep up the good work!!

Money-dreamer is still a nice job.
Node.js v8.9.4 Documentation
Table of Contents

Oh no! This time...I have no idea on the contest Sir. I'll just wait for your next contest. Hahaha
I'll just upvote your post Sir. :)

Coin Marketplace

STEEM 0.16
TRX 0.15
JST 0.029
BTC 57681.36
ETH 2446.21
USDT 1.00
SBD 2.30