{"id":18270491,"url":"https://github.com/nostra13/Android-Simple-Social-Sharing","last_synced_at":"2025-04-05T01:30:38.669Z","repository":{"id":2104775,"uuid":"3046174","full_name":"nostra13/Android-Simple-Social-Sharing","owner":"nostra13","description":"Reusable instrument for simple sharing with popular social networks (Facebook, Twiiter).","archived":false,"fork":false,"pushed_at":"2024-05-17T12:26:58.000Z","size":1901,"stargazers_count":247,"open_issues_count":8,"forks_count":125,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-03-29T20:06:45.085Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nostra13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-12-24T21:49:17.000Z","updated_at":"2024-05-31T11:10:10.000Z","dependencies_parsed_at":"2024-11-05T11:53:50.571Z","dependency_job_id":null,"html_url":"https://github.com/nostra13/Android-Simple-Social-Sharing","commit_stats":{"total_commits":58,"total_committers":5,"mean_commits":11.6,"dds":0.06896551724137934,"last_synced_commit":"b1a34506229159a0fdd359a3e7c17ce57f3b53df"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nostra13%2FAndroid-Simple-Social-Sharing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nostra13%2FAndroid-Simple-Social-Sharing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nostra13%2FAndroid-Simple-Social-Sharing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nostra13%2FAndroid-Simple-Social-Sharing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nostra13","download_url":"https://codeload.github.com/nostra13/Android-Simple-Social-Sharing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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","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":[],"created_at":"2024-11-05T11:38:40.396Z","updated_at":"2025-04-05T01:30:37.912Z","avatar_url":"https://github.com/nostra13.png","language":"Java","funding_links":[],"categories":["etc"],"sub_categories":[],"readme":"## ! THIS PROJECT IS NO LONGER BEING MAINTAINED !\r\n\r\n# Simple Social Sharing for Android\r\n\r\nThis project aims to provide a reusable instrument for simple sharing with popular social networks (Facebook, Twiiter).\r\nProject uses other open source projects' code (actual on 25.02.2012):\r\n\r\n * [Facebook SDK for Android](https://github.com/facebook/facebook-android-sdk)\r\n * [OAuth Signpost](https://github.com/kaeppler/signpost)\r\n * [JTwitter](https://github.com/winterstein/JTwitter)\r\n\r\n\r\n## Features\r\n * Simple API for Facebook and Twitter sharing (fast indroduction)\r\n * Simple API for event listening (authentication, posting, logging out)\r\n * Support only simple sharing (post message or image to Facebook, post status to Twitter)\r\n\r\n**Important:** In your Twitter Developer Application Settings (https://dev.twitter.com/) you must fill \"Callback URL\" field with any URL (i.e. http://abc.de).\r\nIt's behaviour by default.\r\n\r\nThere are two classes in SSS:\r\n\r\n * TwitterDialog\r\n * CallbackTwitterDialog\r\n \r\n```CallbackTwitterDialog``` is used by default and it works only when \"Callback URL\" is filled in your Twitter Application settings.\r\nYou may not use callback URL. Then you should clear \"Callback URL\" field in app settings and replace all using ```CallbackTwitterDialog``` with ```TwitterDilaog``` (in ```TwitterFacade``` class).\r\n\r\n## Usage\r\n\r\n### Sharing API\r\n\r\n#### Facebook\r\n\r\n``` java\r\nFacebookFacade facebook = new FacebookFacade(activity, FACEBOOK_APP_ID);\r\nif (!facebook.isAuthorized()) {\r\n\tfacebook.authorize();\r\n}\r\nfacebook.publishMessage(\"This is great App!\");\r\nfacebook.logout();\r\n```\r\n\r\n**More powerful posting:**\r\n\r\n``` java\r\nMap actions = new HashMap\u003cString, String\u003e();\r\nactions.put(\"Android Simple Social Sharing\", \"https://github.com/nostra13\");\r\nfacebook.publishMessage(\"Look at this great App!\",\r\n\t\t\t\t\t\t\"Use Android Simple Social Sharing in your project!\",\r\n\t\t\t\t\t\t\"https://github.com/nostra13/Android-Simple-Social-Sharing\",\r\n\t\t\t\t\t\t\"Also see other projects of nostra13 on GitHub!\",\r\n\t\t\t\t\t\t\"http://.......facebook-android-logo-1.jpg\",\r\n\t\t\t\t\t\tactions);\r\n```\r\n![Screenshot](https://github.com/nostra13/Android-Simple-Social-Sharing/raw/master/FacebookPost.png)\r\n\r\n#### Twitter\r\n\r\n``` java\r\nTwitterFacade twitter = new TwitterFacade(context, TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);\r\nif (!twitter.isAuthorized()) {\r\n\ttwitter.authorize();\r\n}\r\ntwitter.publishMessage(\"This is great app!\");\r\ntwitter.logout();\r\n```\r\n\r\n### Event listening API\r\n\r\n#### Facebook\r\n\r\n``` java\r\n...\r\n\t@Override\r\n\tprotected void onStart() {\r\n\t\tsuper.onStart();\r\n\t\tFacebookEvents.addAuthListener(authListener);\r\n\t\tFacebookEvents.addPostListener(postListener);\r\n\t\tFacebookEvents.addLogoutListener(logoutListener);\r\n\t}\r\n\r\n\t@Override\r\n\tprotected void onStop() {\r\n\t\tsuper.onStop();\r\n\t\tFacebookEvents.removeAuthListener(authListener);\r\n\t\tFacebookEvents.removePostListener(postListener);\r\n\t\tFacebookEvents.removeLogoutListener(logoutListener);\r\n\t}\r\n\r\n\tprivate AuthListener authListener = new AuthListener() {\r\n\t\t@Override\r\n\t\tpublic void onAuthSucceed() {\r\n\t\t\tshowToastOnUIThread(\"Facebook authentication is successful\");\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void onAuthFail(String error) {\r\n\t\t\tshowToastOnUIThread(\"Error was occurred during Facebook authentication\");\r\n\t\t}\r\n\t};\r\n\r\n\tprivate PostListener postListener = new PostListener() {\r\n\t\t@Override\r\n\t\tpublic void onPostPublishingFailed() {\r\n\t\t\tshowToastOnUIThread(\"Post publishing was failed\");\r\n\t\t}\r\n\r\n\t\t@Override\r\n\t\tpublic void onPostPublished() {\r\n\t\t\tshowToastOnUIThread(\"Posted to Facebook successfully\");\r\n\t\t}\r\n\t};\r\n\r\n\tprivate LogoutListener logoutListener = new LogoutListener() {\r\n\t\t@Override\r\n\t\tpublic void onLogoutComplete() {\r\n\t\t\tshowToastOnUIThread(\"You are logged out\");\r\n\t\t}\r\n\t};\r\n\r\n\tprivate void showToastOnUIThread(final String text) {\r\n\t\trunOnUiThread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tToast.makeText(YourActivity.this, text, Toast.LENGTH_SHORT).show();\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n...\r\n```\r\n\r\n#### Twitter\r\n\r\nLike Facebook listening example but use TwitterEvents instead of FacebookEvents.\r\n \r\n## License\r\n\r\nLicensed under the [BSD 3-clause](http://www.opensource.org/licenses/BSD-3-Clause)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnostra13%2FAndroid-Simple-Social-Sharing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnostra13%2FAndroid-Simple-Social-Sharing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnostra13%2FAndroid-Simple-Social-Sharing/lists"}