This implementation requires you to run the library (*.jar) to be executed.
You've to understand general concept of these main points:
-
OOP Concept
-
Method
-
Thread
Power Point
First you have to put the *.jar file under your Project.
Then you may use the following code :
We're going to :
-
Logging into Facebook
-
Publishing a post
Here is the code:
Engine myBot = new Engine();
Account myUser = new Account("satu@gmail.com”, “konci123”, SocialMedia.FACEBOOK);
myUser.addPost(“Cobalah SocNetSDK ada di github koq!”);
myBot.addUser(myUser);
myBot.start(true);
Only 5 lines of code, have you tried it before? The last line whereas true parameter given will effecting the Frame to be automatically closed when all works have been executed.
We're going to :
-
Logging into 2 Different Social Medias
-
Publish the same post
So, here is the code:
Engine myBot = new Engine();
Account myUsers []= AccountBuilder.create("one@gmail.com", "konci", “hayo coba socnetSDK!”,
SocialMedia.FACEBOOK, SocialMedia.TWITTER);
myBot.addUsers(myUsers);
myBot.start(true, 5, 13);
We've just used AccountBuilder for creating account into different social medias.
And take a look for the last line of code, we put true for auto-closing-frame, and then interval-min which is 5 and interval-max which is 13.
What's that means anyway? SocNetSDK will have a time to wait within several minute either 5-13 minutes for each post gap. So your activity in social medias are good to go for future usage! Our suggestion is always use above 5 minutes for safety reason.
That's it!