{"id":15134067,"url":"https://github.com/stfalcon-studio/socialauthhelper","last_synced_at":"2025-10-12T03:41:49.408Z","repository":{"id":140550922,"uuid":"65981400","full_name":"stfalcon-studio/SocialAuthHelper","owner":"stfalcon-studio","description":"Easy social network authorization for Android. Supports Facebook, Twitter, Instagram, Google+, Vkontakte. Made by Stfalcon","archived":false,"fork":false,"pushed_at":"2017-07-19T08:05:51.000Z","size":130,"stargazers_count":98,"open_issues_count":1,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-05-21T00:44:50.889Z","etag":null,"topics":["android","authorization","facebook","googleplus","instagram","twitter","vkontakte"],"latest_commit_sha":null,"homepage":"https://stfalcon.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stfalcon-studio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-18T08:53:16.000Z","updated_at":"2023-08-03T22:54:05.000Z","dependencies_parsed_at":"2024-01-07T06:49:55.993Z","dependency_job_id":"7b2f4fe4-a1da-4469-919d-fc6fc4cbec2a","html_url":"https://github.com/stfalcon-studio/SocialAuthHelper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stfalcon-studio/SocialAuthHelper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FSocialAuthHelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FSocialAuthHelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FSocialAuthHelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FSocialAuthHelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stfalcon-studio","download_url":"https://codeload.github.com/stfalcon-studio/SocialAuthHelper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stfalcon-studio%2FSocialAuthHelper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010142,"owners_count":26084692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","authorization","facebook","googleplus","instagram","twitter","vkontakte"],"created_at":"2024-09-26T05:02:16.105Z","updated_at":"2025-10-12T03:41:49.375Z","avatar_url":"https://github.com/stfalcon-studio.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SocialAuthHelper\nA library that helps to implement social network authorization (Facebook, Twitter, Instagram, GooglePlus, Vkontakte).\n\n### Who we are\nNeed iOS and Android apps, MVP development or prototyping? Contact us via info@stfalcon.com. We develop software since 2009, and we're known experts in this field. Check out our [portfolio](https://stfalcon.com/en/portfolio) and see more libraries from [stfalcon-studio](https://stfalcon-studio.github.io/).\n\n## Download\n\nDownload via Gradle:\n```gradle\ncompile 'com.github.stfalcon:socialauthhelper:0.1'\n```\n\nor Maven:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.stfalcon\u003c/groupId\u003e\n  \u003cartifactId\u003esocialauthhelper\u003c/artifactId\u003e\n  \u003cversion\u003e0.1.1\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nIf you don't use fabric plugin for Android studio, put it into gradle:\n```gradle\nrepositories {\n    maven { url 'https://maven.fabric.io/public' }\n}\n\nbuildscript {\n    repositories {\n        mavenCentral()\n        maven { url 'https://maven.fabric.io/public' }\n    }\n\n    dependencies {\n        classpath 'io.fabric.tools:gradle:1.+'\n    }\n}\n\ndependencies {\n    //your dependencies\n    compile ('com.twitter.sdk.android:twitter:1.13.2@aar') {\n        transitive = true;\n    }\n}\n```\n### Twitter\nCreate new application at https://apps.twitter.com\u003cbr /\u003e\nDon't forget to enable: \"Allow this application to be used to Sign in with Twitter.\"\u003cbr /\u003e\nIn Application class or initial activity class:\n```java\nTwitterAuthConfig authConfig = new TwitterAuthConfig(\n                getString(R.string.twitterConsumerKey),//twitter application consumer key\n                getString(R.string.twitterConsumerSecret));//twitter application consumer secret\n//setup fabric\nFabric.with(this, new Twitter(authConfig));\n```\nIn your activity(fragment) class declare field:\n```java\nprivate TwitterClient twitterClient;\n```\nIn onCreate method:\n```java\n//create TwitterClient where `this` is your activity\ntwitterClient = new TwitterClient(this);\n\n//init views\nfinal Button btnTwitter = (Button) findViewById(R.id.btn_twitter);\nfinal TextView tvTwitter = (TextView) findViewById(R.id.tv_twitter);\nfinal ImageView ivTwitter = (ImageView) findViewById(R.id.iv_twitter);\n\n//set onClick event for auth button\nbtnTwitter.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n      twitterClient.getUser(new TwitterClient.UserLoadListener() {\n        @Override\n        public void onUserLoaded(User user, String profileImage) {\n            //after authorization successful you have access to user profile and Access Token\n            tvTwitter.setText(getString(R.string.profileInfo,\n                  user.name,\n                  user.getId(),\n                  twitterClient.getAccessToken()));\n\n            Picasso.with(MainActivity.this).load(profileImage).into(ivTwitter);\n      }\n});\n```\nOverride onActivityResult method:\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    twitterClient.onActivityResult(requestCode, resultCode, data);\n}\n```\n### Vkontakte\nCreate new application at https://vk.com/dev\u003cbr /\u003e\nIn your activity(fragment) class declare field:\n```java\nprivate VkClient vkClient;\n```\nIn onCreate method:\n```java\n//create VkClient where `this` is your activity\nvkClient = new VkClient(this, //activity or fragment\n    getString(R.string.vk_redirect_uri), //vk application redirect uri\n    getString(R.string.vk_client_id)); //vk application clientId\n\n//init views\nfinal Button btnVk = (Button) findViewById(R.id.btn_vk);\nfinal TextView tvVk = (TextView) findViewById(R.id.tv_vk);\nfinal ImageView ivVk = (ImageView) findViewById(R.id.iv_vk);\n//set onClick event for auth button\nbtnVk.setOnClickListener(new View.OnClickListener() {\n        @Override\n        public void onClick(View v) {\n            vkClient.getProfile(new VkClient.DataLoadedListener\u003cVkProfile\u003e() {\n                @Override\n                public void onDataLoaded(VkProfile vkProfile) {\n                  //after authorization successful you have access to user profile and Access Token\n                  tvVk.setText(getString(R.string.profileInfo,\n                      vkProfile.getFirstName() + \" \" + vkProfile.getLastName(),\n                      vkProfile.getId(),\n                      vkClient.getAccessToken()));\n                      \n                  Picasso.with(MainActivity.this).load(vkProfile.getProfilePhoto()).into(ivVk);\n                }\n            });\n        }\n});\n```\nOverride onActivityResult method:\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    vkClient.onActivityResult(requestCode, resultCode, data);\n}\n```\n### Facebook\nCreate new application at https://developers.facebook.com/apps\u003cbr /\u003e\nIn AndroidManifest:\n```xml\n\u003cactivity\n    android:name=\"com.facebook.FacebookActivity\"\n    android:configChanges=\"keyboard|keyboardHidden|screenLayout|screenSize|orientation\"\n    android:theme=\"@android:style/Theme.Translucent.NoTitleBar\" /\u003e\n\u003cprovider\n    android:name=\"com.facebook.FacebookContentProvider\"\n    android:authorities=\"com.facebook.app.FacebookContentProvider\u003cYour facebook application ID\u003e\"\n    android:exported=\"true\" /\u003e\n\u003cmeta-data\n    android:name=\"com.facebook.sdk.ApplicationId\"\n    android:value=\"\u003cYour facebook application ID\u003e\" /\u003e\n```\n\nIn your activity(fragment) class declare field:\n```java\nprivate FacebookClient facebookClient;\n```\nIn onCreate method:\n```java\nfacebookClient = new FacebookClient(this);\n\n//init views\nfinal Button btnFacebook = (Button) findViewById(R.id.btn_facebook);\nfinal TextView tvFacebook = (TextView) findViewById(R.id.tv_facebook);\nfinal ImageView ivFacebook = (ImageView) findViewById(R.id.iv_facebook);\n\n//set onClick event for auth button\nbtnFacebook.setOnClickListener(new View.OnClickListener() {\n@Override\npublic void onClick(View v) {\n    facebookClient.getProfile(new FacebookClient.FbResultCallback() {\n        @Override\n        public void onProfileLoaded(FacebookProfile facebookProfile) {\n            //after authorization successful you have access to user profile and Access Token\n            tvFacebook.setText(getString(R.string.profileInfo,\n                    facebookProfile.getName(),\n                    facebookProfile.getId(),\n                    facebookClient.getToken()));\n                    \n            Picasso.with(MainActivity.this).load(\n                    facebookProfile.getPicture().data.url).into(ivFacebook);\n        }\n    });\n}\n});\n```\nOverride onActivityResult method:\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    facebookClient.onActivityResult(requestCode, resultCode, data);\n}\n```\n\n### Google+\nCreate new application at https://console.developers.google.com/\u003cbr /\u003e\nDon't forget to enable google plus api.\u003cbr /\u003e\nIn your activity(fragment) class declare field:\n```java\nprivate GooglePlusClient googlePlusClient;\n```\nIn onCreate method:\n```java\ngooglePlusClient = new GooglePlusClient(this, \n    getString(R.string.googleClientId));//Web client id\n\n//init views\nfinal Button btnGoogle = (Button) findViewById(R.id.btn_google);\nfinal TextView tvGoogle = (TextView) findViewById(R.id.tv_google);\nfinal ImageView ivGoogle = (ImageView) findViewById(R.id.iv_google);\n        \n//set onClick event for auth button\nbtnGoogle.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n      googlePlusClient.getProfile(new GooglePlusClient.GooglePlusResultCallback() {\n          @Override\n          public void onProfileLoaded(GooglePlusProfile googlePlusProfile) {\n              //after authorization successful you have access to user profile and Access Token\n              tvGoogle.setText(getString(R.string.profileInfo,\n                      googlePlusProfile.getName(),\n                      googlePlusProfile.getId(),\n                      facebookClient.getToken()));\n                      \n              Picasso.with(MainActivity.this).load(\n                      googlePlusProfile.getAvatar()).into(ivGoogle);\n          }\n      });\n    }\n});\n```\nOverride onActivityResult method:\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    googlePlusClient.onActivityResult(requestCode, resultCode, data);\n}\n```\n\n### Instagram\nCreate new application at https://www.instagram.com/developer/clients/manage/\u003cbr /\u003e\nDon't forget to enable implicit OAuth in application security settings.\n\nIn your activity(fragment) class declare field:\n```java\nprivate InstagramClient instagramClient;\n```\nIn onCreate method:\n```java\ninstagramClient = new InstagramClient(this,\n                getString(R.string.instagramRedirectUri), //instagram application redirect uri\n                getString(R.string.instagramClientId)); //instagram application client id\n\n//init views\nfinal Button btnInstagram = (Button) findViewById(R.id.btn_instagram);\nfinal TextView tvInstagram = (TextView) findViewById(R.id.tv_instagram);\nfinal ImageView ivInstagram = (ImageView) findViewById(R.id.iv_instagram);\n\n//set onClick event for auth button\nbtnInstagram.setOnClickListener(new View.OnClickListener() {\n    @Override\n    public void onClick(View v) {\n        instagramClient.getProfile(new InstagramClient.DataLoadedListener\u003cInstagramProfile\u003e() {\n            @Override\n            public void onDataLoaded(InstagramProfile instagramProfile) {\n                //after authorization successful you have access to user profile and Access Token\n                tvInstagram.setText(getString(R.string.profileInfo,\n                        instagramProfile.getFullName(),\n                        instagramProfile.getId(),\n                        facebookClient.getToken()));\n                        \n                Picasso.with(MainActivity.this).load(\n                        instagramProfile.getProfilePicture()).into(ivInstagram);\n            }\n        });\n    }\n});\n```\n\nOverride onActivityResult method:\n```java\n@Override\nprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n    instagramClient.onActivityResult(requestCode, resultCode, data);\n}\n```\n\nTake a look at the [sample projects](sample) for more information\n\n## License \n\n```\nCopyright 2017 stfalcon.com\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[sample]: \u003chttps://github.com/stfalcon-studio/SocialAuthHelper/tree/master/sample\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstfalcon-studio%2Fsocialauthhelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstfalcon-studio%2Fsocialauthhelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstfalcon-studio%2Fsocialauthhelper/lists"}