Giter VIP home page Giter VIP logo

bsky4j's Introduction

Hi there 👋

I'm passionate about social media and enjoy creating client apps and libraries for them. Whether it's crafting server-side apps with Kotlin or Go, or building iOS and web apps, I'm always eager to dive in! Check out my portfolio site to see what I've created!

(2024E) I'm working on creating social media libraries using Kotlin Multiplatform. Additionally, I'm developing PlanetLink🪐, a library that seamlessly handles multiple social media platforms transparently. I hope you'll use it to craft some amazing apps 🙌

bsky4j's People

Contributors

lamrongol avatar takke avatar uakihir0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bsky4j's Issues

Please support subscribeRepos(Streaming)

I'm sorry to ask, but could you please enable com.atproto.sync.subscribeRepos, which is like Streaming API for Twitter and Misskey? https://atproto.com/lexicons/com-atproto-sync#comatprotosyncsubscriberepos

http://whenitrains.glitch.me uses this to retrieve all posts for bsky.social and the (javascript) source code is below. http://whenitrains.glitch.me/script.mjs
There is also a Python version, but it doesn't seem to actually work: https://acidafghan.glitch.me/script.txt

Edit:
I run http://whenitrains.glitch.me/script.mjs by Deno and send post to my Java program by
Socket.IO and once this is solved.


お願いになってしまい申し訳ないのですが、TwitterやMisskeyのStreaming APIにあたるcom.atproto.sync.subscribeReposを使えるようにしていただけないでしょうか。
https://atproto.com/lexicons/com-atproto-sync#comatprotosyncsubscriberepos

http://whenitrains.glitch.me というサイトではこれを利用してbsky.socialのすべてのポストを取得しており、(javascriptの)ソースコードは以下です。
http://whenitrains.glitch.me/script.mjs
Python版もありますが実際には動かないようです。
https://acidafghan.glitch.me/script.txt

追記:
http://whenitrains.glitch.me/script.mjs をDenoで動かしSocket.IOでJavaにポストを送ることで一旦解決しました。

FacetUtil.extractFacets() removes https:// - posted url isn't completely clickable

Sorry if this is on my end, but I can't get posting with a link to work properly.

Reproduce:

FacetUtil.extractFacets(text).getRichTextFacets(new HashMap<>());
With for example text = "something something https://www.avalidlink.com/something/123456"
Posting using the FeedPostRequest.builder() with facets(text) and facets(list).
Results in a post with only start of URL being a link.

For example above the missing character count appear to match https:// (8 chars) which leads me to believe its the linkFacet method that is the issue. However I have one more example:
"Bluesky - 𝕏 alternative - is now available as an invite-only beta" + newline + a link to a forum thread
The Bluesky post is missing 8+2 characters of the link.

Prevent logging of app password

bsky4j uses socialhub's httpclient which has a default behavior of logging at a debug level, including the details of all http requests. This causes bsk4j to log bluesky app passwords, which is not a good security practice.

A workaround in my projects is to change the logging level of the offending class before I do any http calls.

import net.socialhub.http.HttpClientImpl;
import net.socialhub.logger.Logger;
...
        Logger.getLogger(HttpClientImpl.class).setLogLevel(Logger.LogLevel.ERROR);

I don't see any configuration file access in socialhub's Logger code, so I don't know if there is a more elegant solution. But at the very least, bsky4j could change the socialhub logging level at some early point in its initialization before any http requests. Even just changing the level to INFO should reduce the security risk.

Upload attachment?

Thank you for the work on the library, it's exactly what I'm looking for!

I'm just wondering if it's possible to attach an image to a FeedPostRequest object, when posting a request?

Question mark emojis

Have a very strange issue, hoping you can help.
I've built a bot to run on BlueSky using bsky4j, and testing on my laptop running JDK8 on Ubuntu creates the update, including emojis correctly, but running it on a Raspberry Pi using OpenJDK 8 creates the update, but with question marks - ? - replacing the emoji
The bot also posts updates to Mastodon, and there the emoji are rendered correctly.
Have you any thoughts on what might be causing this?

Default post time is wrong(デフォルトのポストの投稿時刻が間違っています).

createdAt time on Bluesky must be based on UTF+0. Also, older versions of Java may get the wrong time. In Java 17, this can be solved by setting .createdAt(Instant.now().toString()).


Blueskyではデフォルト投稿時刻はUTF+0基準にしないといけないそうです。また、Javaの古いバージョンでは誤った時刻を取得してしまうそうです。
Java 17では.createdAt(Instant.now().toString())と設定することで解決できます。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.