Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reblogged from #121

Open
LilWizzard opened this issue Jul 10, 2018 · 2 comments
Open

Reblogged from #121

LilWizzard opened this issue Jul 10, 2018 · 2 comments

Comments

@LilWizzard
Copy link

.getRebloggedFromId() and .getRebloggedFromName() methods do not return any usable data.
I needed to use them to be able to separate native and reblogged posts, but each and every time (even when Tumblr post is 100% reblogged) these little things return null as an answer. Which is not really surprising since reblogged_from_id and reblogged_from_name fields are empty.
I have checked Tumblr's JSON responses - and they do contain proper reblog info, so the problem seems to be somewhere in jumblr library.

@MichaelFriedrich
Copy link

I see a difference when I use the client.blogPosts("name", options) method.
You have to set the request parameter for reblog_info to true:

Map options = new HashMap<>();
// options.put("id",<your ID here if you want to have a single result>);
options.put("reblog_info",Boolean.TRUE);
List<Post> posts = client.blogPosts("blogname", options);
var id = posts.get(0).getRebloggedFromId();

// this works :-)

Note that the difference is client.blogPost vs client.blogPosts an only the last takes options fo reblog_info.

@MichaelFriedrich
Copy link

It would be nice to have the possibilty to set the options in client.blogPost like in client.blogPosts (note the s)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants