Giter Club home page Giter Club logo

jxinsta's Introduction

JxInsta

JxInsta

A java library of Instagram private web API (may include mobile api in future). This library is built as a replacement for instagram4j since it was too old fashioned and was facing a challenge problem due to a similar header population problem among it's users. This project is lead by EasyInsta and is part of it.

Features

  • Lightweight and Easy 2 use, Object-oriented
  • No need API token
  • Supports Sending messages
  • Supports Getting/fetching messages
  • Supports Deleting message
  • Supports Realtime direct messages listener (Pending)
  • Supports Login using cache/saving sessions
  • Supports Posting (Picture)
  • Supports Adding stories (Photo)
  • Supports Following/Unfollowing
  • Supports Acception/Ignoring follow request (Pending)
  • Supports Scrapping followings and followers
  • Supports Getting profile data
  • Supports Liking/commenting on post
  • Supports Fetching feeds/timeline post
  • Supports Downloading posts and pfp

Implimentation

Due to the outage of jitpack, the library cannot published. Therfore, you have to locally implement it by puting the .jar file in the lib directory.

Step 1 : Download the .jar from the release section and put it in lib folder of your project.

Step 2 : declare the dependency

For gradle

dependencies {
    implementation files('libs/JxInsta-v1.0-beta.jar')
    implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '5.0.0-alpha.11' //skip if already implemented
}

For maven

<dependency>
    <groupId>com.sample</groupId>
    <artifactId>jxinsta</artifactId>
    <version>v1.0-beta-2</version>
    <scope>system</scope>
    <systemPath>${project.basedir}/lib/JxInsta-v1.0-beta-2.jar</systemPath>
</dependency>

<dependency>
    <groupId>com.squareup.okhttp3</groupId>
    <artifactId>okhttp</artifactId>
    <version>5.0.0-alpha.11</version>
</dependency>

You can search on Google for more info on including local dependencies.

Acknowledgements

Its easy :)

JxInsta insta = new JxInsta("username", "password", JxInsta.LoginType.WEB_AUTHENTICATION);  
insta.uploadStory(new File("photos/story-24.png"));  
var profile = insta.getProfile("username").;
...

Documentation

Javadoc (Not needed)

User guide

FAQ

[Q.1] Can we use this library to make bots?

Answer. Yes. But Instagram doesn't allow them to make bots with their official graph APIs. Although this is not the official API, you should follow the usage limits to prevent detection.

[Q.2] Can we download stories or posts using this library?

Answer. Yes, and that too without login

[Q.3] Does the use of this library require any tokens or other keys?

Answer. No. You only need to have the username and password of the account. You can also log in using cookies and bearer tokens.

[Q.4] In Android, can we use Webview to log in?

Answer. Yes, check this example on how to use that

Contributing

Contributions are always welcome! There is a lot of scope for contribution in this library.

Please refer to Contribution guide. Also, see the code of conduct. Please see Todo. md to see what features are pending and what things you can add on your end.

Support

The fastest channel to contact me is Instagram, just DM me and I'll reply to you within 24 hours. My Instagram : x0.rahil

You can show your support by giving a ⭐.

jxinsta's People

Contributors

errorxcode avatar syedhilalhusain avatar

Stargazers

Ali Kemal Öcalan avatar Olaf Foryś avatar  avatar kurayami avatar Adrià avatar  avatar Nikhil avatar  avatar cyrus avatar Noah Overcash avatar Jan Mlejnecký avatar Daniel Bejan avatar

Watchers

 avatar  avatar  avatar

jxinsta's Issues

How to create a Thread

We can send messages to someone through threadid, but if I have never sent a message to that person before, how should I create a conversation with them to get the threadid?
image

Please make it work with Java8

Hello.
I tried this library and found it very nice!

By the way, I wanna use this library in my Java8 project. so please make this work with Java8.
Thank you.

error: cannot access PublicAPIs

I tried to add libs like this:

<dependency>
            <groupId>com.errorxcode.jxinsta</groupId>
            <artifactId>jxinsta</artifactId>
            <version>v1.0-beta-2</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/JxInsta-v1.0-beta-2.jar</systemPath>
</dependency>

im using netbeans and java 1.8, but it always return error cannot access PublicAPIs when run the project.
Look like it not work with local dependency , please help

updated: when i try with Ant and add the Jar file
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/errorxcode/jxinsta/endpoints/PublicAPIs has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Handle is missing error when posting picture.

Error while trying to post a picture. Error message and example code are below.

Library Version: JxInsta-v1.0-beta-2.jar
Java Version: 17

{"debug_info":{"retriable":false,"type":"ProcessingFailedError","message":"{\"message\":\"Handle is missing.\",\"status\":\"fail\"}"}}

 val insta = JxInsta("myhandle", "mypassword", JxInsta.LoginType.BOTH_WEB_AND_APP_AUTHENTICATION)
    val url = URL("PATH_TO_IMAGE")
    val imageData: ByteArray = url.readBytes()
    insta.postPicture(
        ByteArrayInputStream(imageData),
        "This is a caption",
        false
    )

Library not on jitpack

After I got an official response from Instagram4J's creator, I decided to migrate my project to use this library.
However, I have a few questions before I even write the first line of code:

  1. Why do I also need to add the OkHttp dependency - why isn't it included in the artifact?

  2. I read the README and I'm not sure which outages you're talking about, Jitpack works great and I use it in all of my projects -
    I highly recommend posting Jitpack dependencies.

Acces token

Does this coding want acces token for instagram.

Upload video/reels

Is it possible to upload videos and or reels through this api?

And if not, will it be possible?

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.