10 SBD SteemJS Programming Question

in steemjs •  7 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.

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:  
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

  ·  7 years ago (edited)

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.

  ·  7 years ago (edited)

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

  ·  7 years ago (edited)

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. :)

좋은 정보 감사해요.

What did you find good about the info?

위 내용 전부 지만 시간이 없어 해보지는 못했다.

Woow amazing l like thanks for sharing misster, very very good

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

Excellent way to create and put into practice the knowledge of java! Congratulations

Looking into it now. I’ll get back to you if I figure it out

I never used these functions but appreciate your approach to solve it. We need our own stackoverflow here :)

There is no financial reward on stackoverflow. There is so much more of an incentive here.

hehe, yeah exactly :)

We have our own stackoverflow it's called https://www.peerquery.com/questions

Okay so not quite stackoverflow but it is Q+A and more running on Steem

I still vote.
Have a nice day today.

thank you @money-dreamer for supporting

Oke sir
Right (y) .

It is too difficult for me. T-T

  ·  7 years ago (edited)

Disclaimer it was 3 in the morning and now is 2am again, but it was bothering me.

https://v2.steemconnect.com/docs/steemjs#api/get_reblogged_by

full API docs

Basic Code

And basic results. Sorry not sure how the fuck I missed this, their api does the work for you, not sure how but a simple steem.api.getRebloggedBy will return all reblogged.

I hope this helps. classic case of RTFM haha.