All Projects → stfalcon-studio → Socialauthhelper

stfalcon-studio / Socialauthhelper

Easy social network authorization for Android. Supports Facebook, Twitter, Instagram, Google+, Vkontakte. Made by Stfalcon

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Socialauthhelper

Assent
Multi-provider framework in Elixir
Stars: ✭ 126 (+34.04%)
Mutual labels:  twitter, facebook, instagram, vkontakte
Nemiro.oauth.dll
Nemiro.OAuth is a class library for authorization via OAuth protocol in .NET Framework
Stars: ✭ 45 (-52.13%)
Mutual labels:  twitter, facebook, instagram, vkontakte
Keyring
Keyring is an authentication framework for WordPress. It comes with definitions for a variety of HTTP Basic, OAuth1 and OAuth2 web services. Use it as a common foundation for working with other web services from within WordPress code.
Stars: ✭ 52 (-44.68%)
Mutual labels:  twitter, facebook, instagram
Socialmanagertools Gui
🤖 👻 Desktop application for Instagram Bot, Twitter Bot and Facebook Bot
Stars: ✭ 293 (+211.7%)
Mutual labels:  twitter, facebook, instagram
Play Pac4j
Security library for Play framework 2 in Java and Scala: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 375 (+298.94%)
Mutual labels:  authorization, twitter, facebook
Timeliner
In general, Timeliner obtains items from data sources and stores them in a timeline.
Stars: ✭ 2,911 (+2996.81%)
Mutual labels:  twitter, facebook, instagram
Embera
A Oembed consumer library, that gives you information about urls. It helps you replace urls to youtube or vimeo for example, with their html embed code. It has advanced features like offline support, responsive embeds and caching support.
Stars: ✭ 268 (+185.11%)
Mutual labels:  twitter, facebook, instagram
Socialbox Termux
SocialBox is a Bruteforce Attack Framework [ Facebook , Gmail , Instagram ,Twitter ] , Coded By Belahsan Ouerghi Edit By init__0 for termux on android
Stars: ✭ 324 (+244.68%)
Mutual labels:  twitter, facebook, instagram
Spring Webmvc Pac4j
Security library for Spring Web MVC: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 110 (+17.02%)
Mutual labels:  authorization, twitter, facebook
Network Avatar Picker
A npm module that returns user's social network avatar. Supported providers: facebook, instagram, twitter, tumblr, vimeo, github, youtube and gmail
Stars: ✭ 74 (-21.28%)
Mutual labels:  twitter, facebook, instagram
Skraper
Kotlin/Java library and cli tool for scraping posts and media from various sources with neither authorization nor full page rendering (Facebook, Instagram, Twitter, Youtube, Tiktok, Telegram, Twitch, Reddit, 9GAG, Pinterest, Flickr, Tumblr, IFunny, VK, Pikabu)
Stars: ✭ 72 (-23.4%)
Mutual labels:  twitter, facebook, instagram
Spam Bot 3000
Social media research and promotion, semi-autonomous CLI bot
Stars: ✭ 79 (-15.96%)
Mutual labels:  twitter, facebook, instagram
Spring Security Pac4j
pac4j security library for Spring Security: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 231 (+145.74%)
Mutual labels:  authorization, twitter, facebook
Feeds
Importiert Daten aus API-Quellen wie Facebook, Instagram, Twitter, YouTube, Vimeo oder RSS (ehemals YFeed)
Stars: ✭ 34 (-63.83%)
Mutual labels:  twitter, facebook, instagram
Spark Pac4j
Security library for Sparkjava: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 154 (+63.83%)
Mutual labels:  authorization, twitter, facebook
Social Media Profiles Regexs
📇 Extract social media profiles and more with regular expressions
Stars: ✭ 324 (+244.68%)
Mutual labels:  twitter, facebook, instagram
Bash2mp4
Video Downloader for Termux .
Stars: ✭ 68 (-27.66%)
Mutual labels:  twitter, facebook, instagram
Ngx Avatar
Universal avatar component for angular 2+ applications makes it possible to fetch / generate avatar from different sources
Stars: ✭ 210 (+123.4%)
Mutual labels:  twitter, facebook, vkontakte
Pow assent
Multi-provider authentication for your Pow enabled app
Stars: ✭ 236 (+151.06%)
Mutual labels:  twitter, facebook, instagram
Buji Pac4j
pac4j security library for Shiro: OAuth, CAS, SAML, OpenID Connect, LDAP, JWT...
Stars: ✭ 444 (+372.34%)
Mutual labels:  authorization, twitter, facebook

SocialAuthHelper

A library that helps to implement social network authorization (Facebook, Twitter, Instagram, GooglePlus, Vkontakte).

Who we are

Need iOS and Android apps, MVP development or prototyping? Contact us via [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.

Download

Download via Gradle:

compile 'com.github.stfalcon:socialauthhelper:0.1'

or Maven:

<dependency>
  <groupId>com.github.stfalcon</groupId>
  <artifactId>socialauthhelper</artifactId>
  <version>0.1.1</version>
  <type>pom</type>
</dependency>

Usage

If you don't use fabric plugin for Android studio, put it into gradle:

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

buildscript {
    repositories {
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

dependencies {
    //your dependencies
    compile ('com.twitter.sdk.android:twitter:[email protected]') {
        transitive = true;
    }
}

Twitter

Create new application at https://apps.twitter.com
Don't forget to enable: "Allow this application to be used to Sign in with Twitter."
In Application class or initial activity class:

TwitterAuthConfig authConfig = new TwitterAuthConfig(
                getString(R.string.twitterConsumerKey),//twitter application consumer key
                getString(R.string.twitterConsumerSecret));//twitter application consumer secret
//setup fabric
Fabric.with(this, new Twitter(authConfig));

In your activity(fragment) class declare field:

private TwitterClient twitterClient;

In onCreate method:

//create TwitterClient where `this` is your activity
twitterClient = new TwitterClient(this);

//init views
final Button btnTwitter = (Button) findViewById(R.id.btn_twitter);
final TextView tvTwitter = (TextView) findViewById(R.id.tv_twitter);
final ImageView ivTwitter = (ImageView) findViewById(R.id.iv_twitter);

//set onClick event for auth button
btnTwitter.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      twitterClient.getUser(new TwitterClient.UserLoadListener() {
        @Override
        public void onUserLoaded(User user, String profileImage) {
            //after authorization successful you have access to user profile and Access Token
            tvTwitter.setText(getString(R.string.profileInfo,
                  user.name,
                  user.getId(),
                  twitterClient.getAccessToken()));

            Picasso.with(MainActivity.this).load(profileImage).into(ivTwitter);
      }
});

Override onActivityResult method:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    twitterClient.onActivityResult(requestCode, resultCode, data);
}

Vkontakte

Create new application at https://vk.com/dev
In your activity(fragment) class declare field:

private VkClient vkClient;

In onCreate method:

//create VkClient where `this` is your activity
vkClient = new VkClient(this, //activity or fragment
    getString(R.string.vk_redirect_uri), //vk application redirect uri
    getString(R.string.vk_client_id)); //vk application clientId

//init views
final Button btnVk = (Button) findViewById(R.id.btn_vk);
final TextView tvVk = (TextView) findViewById(R.id.tv_vk);
final ImageView ivVk = (ImageView) findViewById(R.id.iv_vk);
//set onClick event for auth button
btnVk.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            vkClient.getProfile(new VkClient.DataLoadedListener<VkProfile>() {
                @Override
                public void onDataLoaded(VkProfile vkProfile) {
                  //after authorization successful you have access to user profile and Access Token
                  tvVk.setText(getString(R.string.profileInfo,
                      vkProfile.getFirstName() + " " + vkProfile.getLastName(),
                      vkProfile.getId(),
                      vkClient.getAccessToken()));
                      
                  Picasso.with(MainActivity.this).load(vkProfile.getProfilePhoto()).into(ivVk);
                }
            });
        }
});

Override onActivityResult method:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    vkClient.onActivityResult(requestCode, resultCode, data);
}

Facebook

Create new application at https://developers.facebook.com/apps
In AndroidManifest:

<activity
    android:name="com.facebook.FacebookActivity"
    android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
    android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<provider
    android:name="com.facebook.FacebookContentProvider"
    android:authorities="com.facebook.app.FacebookContentProvider<Your facebook application ID>"
    android:exported="true" />
<meta-data
    android:name="com.facebook.sdk.ApplicationId"
    android:value="<Your facebook application ID>" />

In your activity(fragment) class declare field:

private FacebookClient facebookClient;

In onCreate method:

facebookClient = new FacebookClient(this);

//init views
final Button btnFacebook = (Button) findViewById(R.id.btn_facebook);
final TextView tvFacebook = (TextView) findViewById(R.id.tv_facebook);
final ImageView ivFacebook = (ImageView) findViewById(R.id.iv_facebook);

//set onClick event for auth button
btnFacebook.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
    facebookClient.getProfile(new FacebookClient.FbResultCallback() {
        @Override
        public void onProfileLoaded(FacebookProfile facebookProfile) {
            //after authorization successful you have access to user profile and Access Token
            tvFacebook.setText(getString(R.string.profileInfo,
                    facebookProfile.getName(),
                    facebookProfile.getId(),
                    facebookClient.getToken()));
                    
            Picasso.with(MainActivity.this).load(
                    facebookProfile.getPicture().data.url).into(ivFacebook);
        }
    });
}
});

Override onActivityResult method:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    facebookClient.onActivityResult(requestCode, resultCode, data);
}

Google+

Create new application at https://console.developers.google.com/
Don't forget to enable google plus api.
In your activity(fragment) class declare field:

private GooglePlusClient googlePlusClient;

In onCreate method:

googlePlusClient = new GooglePlusClient(this, 
    getString(R.string.googleClientId));//Web client id

//init views
final Button btnGoogle = (Button) findViewById(R.id.btn_google);
final TextView tvGoogle = (TextView) findViewById(R.id.tv_google);
final ImageView ivGoogle = (ImageView) findViewById(R.id.iv_google);
        
//set onClick event for auth button
btnGoogle.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
      googlePlusClient.getProfile(new GooglePlusClient.GooglePlusResultCallback() {
          @Override
          public void onProfileLoaded(GooglePlusProfile googlePlusProfile) {
              //after authorization successful you have access to user profile and Access Token
              tvGoogle.setText(getString(R.string.profileInfo,
                      googlePlusProfile.getName(),
                      googlePlusProfile.getId(),
                      facebookClient.getToken()));
                      
              Picasso.with(MainActivity.this).load(
                      googlePlusProfile.getAvatar()).into(ivGoogle);
          }
      });
    }
});

Override onActivityResult method:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    googlePlusClient.onActivityResult(requestCode, resultCode, data);
}

Instagram

Create new application at https://www.instagram.com/developer/clients/manage/
Don't forget to enable implicit OAuth in application security settings.

In your activity(fragment) class declare field:

private InstagramClient instagramClient;

In onCreate method:

instagramClient = new InstagramClient(this,
                getString(R.string.instagramRedirectUri), //instagram application redirect uri
                getString(R.string.instagramClientId)); //instagram application client id

//init views
final Button btnInstagram = (Button) findViewById(R.id.btn_instagram);
final TextView tvInstagram = (TextView) findViewById(R.id.tv_instagram);
final ImageView ivInstagram = (ImageView) findViewById(R.id.iv_instagram);

//set onClick event for auth button
btnInstagram.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        instagramClient.getProfile(new InstagramClient.DataLoadedListener<InstagramProfile>() {
            @Override
            public void onDataLoaded(InstagramProfile instagramProfile) {
                //after authorization successful you have access to user profile and Access Token
                tvInstagram.setText(getString(R.string.profileInfo,
                        instagramProfile.getFullName(),
                        instagramProfile.getId(),
                        facebookClient.getToken()));
                        
                Picasso.with(MainActivity.this).load(
                        instagramProfile.getProfilePicture()).into(ivInstagram);
            }
        });
    }
});

Override onActivityResult method:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    instagramClient.onActivityResult(requestCode, resultCode, data);
}

Take a look at the sample projects for more information

License

Copyright 2017 stfalcon.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].